mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Finished the debugging and changed the logic
This commit is contained in:
parent
58a2280c2b
commit
9c05799714
2 changed files with 3 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ class CategoryAdminForm(forms.ModelForm):
|
|||
model = Category
|
||||
|
||||
def clean_slug(self):
|
||||
if self.instance is None or ALLOW_SLUG_CHANGE:
|
||||
if self.instance is None or not ALLOW_SLUG_CHANGE:
|
||||
self.cleaned_data['slug'] = slugify(self.cleaned_data['name'])
|
||||
return self.cleaned_data['slug']
|
||||
|
||||
|
|
|
|||
|
|
@ -84,4 +84,5 @@ INSTALLED_APPS = (
|
|||
'editor',
|
||||
'mptt',
|
||||
)
|
||||
EDITOR_MEDIA_PATH = '/static/editor/'
|
||||
EDITOR_MEDIA_PATH = '/static/editor/'
|
||||
CATEGORIES_ALLOW_SLUG_CHANGE = True
|
||||
Loading…
Reference in a new issue