Commits

Vladimir Korsun  committed 60867f7

Required attribute is not required now.

  • Participants
  • Parent commits 396fede
  • Tags 1.2.3

Comments (0)

Files changed (2)

 
 setup(
     name='django-field-attributes',
-    version='1.2.2',
+    version='1.2.3',
     packages=['django-field-attributes',
               'django-field-attributes.templatetags'],
     url='http://bitbucket.org/amigo/django-field-attributes',

File src/templatetags/field_attributes.py

     Substitute field widget attributes
     """
 
-    if kwargs.pop('required') in [True, 'True', 'required']:
+    required = kwargs.get('required')
+
+    if required in [True, 'True', 'required']:
         kwargs['required'] = 'required'
 
     field.field.widget.attrs.update(kwargs)