From 758db4f22f8a323db336a8390d97fc0dd14ccdb0 Mon Sep 17 00:00:00 2001 From: Jeff Balogh Date: Fri, 27 Aug 2010 14:41:07 -0700 Subject: [PATCH] the field helper can take extra attributes --- apps/amo/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/amo/helpers.py b/apps/amo/helpers.py index efe8a6216d..54654c5a13 100644 --- a/apps/amo/helpers.py +++ b/apps/amo/helpers.py @@ -296,11 +296,12 @@ def license_link(license): @register.function -def field(field, label=None): +def field(field, label=None, **attrs): if label is not None: field.label = label return jinja2.Markup(u'%s

%s%s

' % - (field.errors, field.label_tag(), field)) + (field.errors, field.label_tag(), + field.as_widget(attrs=attrs))) @register.inclusion_tag('amo/category-arrow.html')