Skip to content

Commit

Permalink
Fixed issue where {% form_field %} potentially clobbers template context
Browse files Browse the repository at this point in the history
  • Loading branch information
bendavis78 committed Feb 12, 2013
1 parent e3472bd commit f8f8b0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion formhelper/templatetags/formhelper.py
Expand Up @@ -46,7 +46,9 @@ def render(self, context):
tpl = get_template('formhelper/includes/field.html')
field = _get_field(self.field, form, context)
context.update({'form': form, 'field': field})
return tpl.render(context)
html = tpl.render(context)
context.pop()
return html

@register.tag
def form_field(parser, token):
Expand Down

0 comments on commit f8f8b0f

Please sign in to comment.