Commits

George Notaras committed fde29a2

Improved manager.

  • Participants
  • Parent commits 04643e4

Comments (0)

Files changed (1)

File src/taggit_autocomplete_modified/managers.py

 
 class TaggableManagerAutocomplete(TaggableManager):
     def formfield(self, form_class=TagField, **kwargs):
-        defaults = {
-            'label': _('Tags'),
-            'help_text': _('Enter a comma-delimited list of tags.'),
-            'required': not self.blank,
-            'widget': TagAutocomplete,
-        }
-        defaults.update(kwargs)
-        return form_class(**defaults)
+        field = super(TaggableManagerAutocomplete, self).formfield(form_class, **kwargs)
+        field.widget = TagAutocomplete()
+        return field
 
-
-    
-
-