mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Fixes issue #26 by limiting the slug to the first 50 characters.
This commit is contained in:
parent
33ae5fc9c1
commit
e0365e8382
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ class CategoryAdminForm(forms.ModelForm):
|
|||
def clean_slug(self):
|
||||
if self.instance is None or not ALLOW_SLUG_CHANGE:
|
||||
self.cleaned_data['slug'] = slugify(self.cleaned_data['name'])
|
||||
return self.cleaned_data['slug']
|
||||
return self.cleaned_data['slug'][:50]
|
||||
|
||||
def clean_alternate_title(self):
|
||||
if self.instance is None or not self.cleaned_data['alternate_title']:
|
||||
|
|
|
|||
Loading…
Reference in a new issue