Hello!
Recently I started to learn Django and ran into a problem with authorization. At first, when submitting the form, the error “CSRF token missing or incorrect” was displayed. Searches on the Internet suggested that you need to register
django.middleware.csrf.CsrfResponseMiddleware . After adding this line to settyngs.py, the data was taken from the form, but on the site itself began to issue “A server error occurred. Please contact the administrator. ”, And the native server says “ImproperlyConfigured: Module ”django.middleware.csrf“ does not define a ”CsrfMiddleware“ attribute/class”.
If you comment everything connected with “django.middleware.csrf”, then everything starts to display normally.
Please tell me what I am wondering and how it is solved.
ps version 1.6