Skip to content

Commit

Permalink
Fixed #12933 - AdminSite.admin_view disables @csrf_view_exempt
Browse files Browse the repository at this point in the history
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
spookylukey committed Feb 27, 2010
1 parent 9f592ec commit d7abb33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/contrib/admin/sites.py
Expand Up @@ -196,7 +196,8 @@ def inner(request, *args, **kwargs):
inner = never_cache(inner)
# We add csrf_protect here so this function can be used as a utility
# function for any view, without having to repeat 'csrf_protect'.
inner = csrf_protect(inner)
if not getattr(view, 'csrf_exempt', False):
inner = csrf_protect(inner)
return update_wrapper(inner, view)

def get_urls(self):
Expand Down

0 comments on commit d7abb33

Please sign in to comment.