Ticket #8127: csrf_middleware_ajax.diff

File csrf_middleware_ajax.diff, 528 bytes (added by xlax, 16 years ago)
  • django-trunk/django/contrib/csrf/middleware.py

     
    4343
    4444    def process_request(self, request):
    4545        if request.method == 'POST':
     46            if request.is_ajax():
     47                return None
    4648            try:
    4749                session_id = request.COOKIES[settings.SESSION_COOKIE_NAME]
    4850            except KeyError:
Back to Top