Permalink
Browse files

Modified TagField's __init__ to take and pass *args along

git-svn-id: https://django-tagging.googlecode.com/svn/trunk@134 83e7428b-ec2a-0410-86f2-bf466d0e5e72
  • Loading branch information...
1 parent 2215852 commit e70bf0560100de18a2386e5203b02ae238de09c7 @insin insin committed Apr 30, 2008
Showing with 3 additions and 3 deletions.
  1. +2 −2 tagging/fields.py
  2. +1 −1 tagging/tests/models.py
View
4 tagging/fields.py
@@ -17,11 +17,11 @@ class TagField(CharField):
"under the hood". This exposes a space-separated string of tags, but does
the splitting/reordering/etc. under the hood.
"""
- def __init__(self, **kwargs):
+ def __init__(self, *args, **kwargs):
kwargs['max_length'] = kwargs.get('max_length', 255)
kwargs['blank'] = kwargs.get('blank', True)
kwargs['validator_list'] = [isTagList] + kwargs.get('validator_list', [])
- super(TagField, self).__init__(**kwargs)
+ super(TagField, self).__init__(*args, **kwargs)
def contribute_to_class(self, cls, name):
super(TagField, self).contribute_to_class(cls, name)
View
2 tagging/tests/models.py
@@ -35,4 +35,4 @@ class Meta:
ordering = ['name']
class FormTest(models.Model):
- tags = TagField()
+ tags = TagField('Test', help_text='Test')

0 comments on commit e70bf05

Please sign in to comment.