Ticket #12933: fix_admin_view_csrf_exempt.diff

File fix_admin_view_csrf_exempt.diff, 557 bytes (added by philomat, 5 years ago)

This patch should fix the problem.

  • sites.py

     
    196196            inner = never_cache(inner)
    197197        # We add csrf_protect here so this function can be used as a utility
    198198        # 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)
    200201        return update_wrapper(inner, view)
    201202
    202203    def get_urls(self):
Back to Top