Skip to content

Commit 80d5927

Browse files
committed
Fix admin form warning
1 parent 9798dd2 commit 80d5927

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tagging/forms.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
class TagAdminForm(forms.ModelForm):
1313
class Meta:
1414
model = Tag
15+
fields = ('name',)
1516

1617
def clean_name(self):
1718
value = self.cleaned_data['name']
@@ -21,7 +22,7 @@ def clean_name(self):
2122
elif len(tag_names[0]) > settings.MAX_TAG_LENGTH:
2223
raise forms.ValidationError(
2324
_('A tag may be no more than %s characters long.') %
24-
settings.MAX_TAG_LENGTH)
25+
settings.MAX_TAG_LENGTH)
2526
return value
2627

2728

@@ -38,5 +39,5 @@ def clean(self, value):
3839
if len(tag_name) > settings.MAX_TAG_LENGTH:
3940
raise forms.ValidationError(
4041
_('Each tag may be no more than %s characters long.') %
41-
settings.MAX_TAG_LENGTH)
42+
settings.MAX_TAG_LENGTH)
4243
return value

0 commit comments

Comments
 (0)