      This middleware should be used in conjunction with the csrf_token template
      tag.
      """
      def process_view(self, request, callback, callback_args, callback_kwargs):
          if getattr(callback, 'csrf_exempt', False):
              return None
  
          if getattr(request, 'csrf_processing_done', False):
              return None
  
          reject = lambda s: _get_failure_view()(request, reason=s)
          def accept():
 
</s> remove from django.views.decorators.csrf import csrf_exempt
 </s> add from django.views.decorators.csrf import csrf_exempt, csrf_view_exempt
      This middleware should be used in conjunction with the csrf_token template
      tag.
      """
      def process_view(self, request, callback, callback_args, callback_kwargs):



          if getattr(request, 'csrf_processing_done', False):
              return None
  
          reject = lambda s: _get_failure_view()(request, reason=s)
          def accept():
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed #13716 - the CSRF get_token function stopped working for views with csrf_view_exempt

This was a regression caused by the the CSRF changes in 1.2.

Thanks to edevil for the report.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@13336 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/middleware/csrf.py