mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Version 1.2.2
This commit is contained in:
parent
b22da41567
commit
a254fe9087
2 changed files with 4 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ __version_info__ = {
|
|||
'major': 1,
|
||||
'minor': 2,
|
||||
'micro': 2,
|
||||
'releaselevel': 'beta',
|
||||
'releaselevel': 'final',
|
||||
'serial': 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,8 +78,9 @@ class CategoryBase(MPTTModel):
|
|||
|
||||
class CategoryBaseAdminForm(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'])
|
||||
if not self.cleaned_data.get('slug', None):
|
||||
if self.instance is None or not ALLOW_SLUG_CHANGE:
|
||||
self.cleaned_data['slug'] = slugify(SLUG_TRANSLITERATOR(self.cleaned_data['name']))
|
||||
return self.cleaned_data['slug'][:50]
|
||||
|
||||
def clean(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue