I believe that I read somewhere that newer Djangos force the CSRF
middleware even if it's not listed in MIDDLEWARE_CLASSES.

You could dive into the middleware code to see how this happens, and
come up with a stable strategy to circumvent it.  Or you could just
fix the necessary views and templates.  There is, after all, a chance
that you will want to be able to upgrade this site without jumping
through hoops.

On Thu, Oct 4, 2012 at 4:56 AM, Laxmikant Gurnalkar
<laxmikant.gurnal...@gmail.com> wrote:
> Hi, Guys
>
> Disabling CSRF is not working.
> These are my midlewares., Removed {% csrf_token %} all templates.
>
> MIDDLEWARE_CLASSES = (
>     'django.middleware.common.CommonMiddleware',
>     'django.contrib.sessions.middleware.SessionMiddleware',
>    # 'django.middleware.csrf.CsrfViewMiddleware',
>     'django.contrib.auth.middleware.AuthenticationMiddleware',
> #    'django.contrib.messages.middleware.MessageMiddleware',
> #    'django.middleware.csrf.CsrfResponseMiddleware',
> #     'igp_acfs.acfs.disablecsrf.DisableCSRF',
> )
>
>
> Also tried by writing disablecsrf.py like this :
>
> class DisableCSRF(object):
>     def process_request(self, request):
>         """
>         """
>         setattr(request, '_dont_enforce_csrf_checks', True)
>
>
> Thanks in Advance!!!
>
> Laxmikant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to