[Answered ]-Why do I get this error "HttpRequest.accepts() missing 1 required positional argument: 'media_type'"?

1👍

if request.accepts(): #Returns True if the request Accept header matches the mime_type argument.

Ex: request.accepts('text/html') #Add your mime_type argument here to solve this error.

I hope this helps you

Leave a comment