Skip to content

Commit

Permalink
Too many CSRF lines removed, we need to pass csrf context so that {% …
Browse files Browse the repository at this point in the history
…crsf_token %} works

Now that CsrfResponseMiddleware has been deprecated in favor of CsrfViewMiddleware, we
need to pass the csrf_token information, so that the template can render it.
  • Loading branch information
maraujop committed Apr 18, 2011
1 parent 2c393eb commit 2872eb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uni_form/templatetags/uni_form_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def get_response_dict(self, attrs, context):
'inputs': inputs,
}

if context.has_key('csrf_token'):
response_dict['csrf_token'] = context['csrf_token']

return response_dict

##################################################################
Expand Down

0 comments on commit 2872eb0

Please sign in to comment.