Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12933 - AdminSite.admin_view disables @csrf_view_exempt

Thanks to philomat for report and patch.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d7abb33e70cf91c983b997cbeafbea2cd0371762 1 parent 9f592ec
Luke Plant authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/contrib/admin/sites.py
3  django/contrib/admin/sites.py
@@ -196,7 +196,8 @@ def inner(request, *args, **kwargs):
196 196
             inner = never_cache(inner)
197 197
         # We add csrf_protect here so this function can be used as a utility
198 198
         # function for any view, without having to repeat 'csrf_protect'.
199  
-        inner = csrf_protect(inner)
  199
+        if not getattr(view, 'csrf_exempt', False):
  200
+            inner = csrf_protect(inner)
200 201
         return update_wrapper(inner, view)
201 202
 
202 203
     def get_urls(self):

0 notes on commit d7abb33

Please sign in to comment.
Something went wrong with that request. Please try again.