Skip to content

Commit

Permalink
Added as_uni_errors and as_uni_field templatetags
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Greenfeld <pydanny@gmail.com>
  • Loading branch information
root authored and pydanny committed Aug 4, 2009
1 parent 8a1bac9 commit 6562c71
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion uni_form/templatetags/uni_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ def as_uni_form(form):
c = Context({'form':form})
return template.render(c)

@register.filter
def as_uni_errors(form):
template = get_template('uni_form/errors.html')
c = Context({'form':form})
return template.render(c)

@register.filter
def as_uni_field(field):
template = get_template('uni_form/field.html')
c = Context({'field':field})
return template.render(c)

############################################################################
#
Expand Down Expand Up @@ -194,4 +205,4 @@ def render(self,context):
c = self.get_render(context)

template = get_template('uni_form/uni_form_jquery.html')
return template.render(c)
return template.render(c)

0 comments on commit 6562c71

Please sign in to comment.