Django error 405
I don't know anything about Django, I've been studying it for a week. At the next start, it started to give an error of 405. There is a lot of code to throw, so if it is not difficult, please tell me what can be the reasons for this error?
0
Author: Dmitry_Maesnes, 2020-09-07
2 answers
The Django 405 error can come from any number of issues, but it usually ends up either using the wrong URL or using the wrong request method. Sometimes both!
1
Author: Wertartem, 2020-09-08 13:43:53
If your view has only the GET method defined, then an attempt to send a request with the POST method will return 405 Method Not Allowed
Like for example this View
class MyView(View):
def get(self, request, *args, **kwargs):
return None
0
Author: alex, 2020-09-07 19:45:49