Finished the debugging and changed the logic

This commit is contained in:
Corey Oordt 2009-10-22 12:36:49 -04:00
parent 58a2280c2b
commit 9c05799714
2 changed files with 3 additions and 2 deletions

View file

@ -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']

View file

@ -84,4 +84,5 @@ INSTALLED_APPS = (
'editor',
'mptt',
)
EDITOR_MEDIA_PATH = '/static/editor/'
EDITOR_MEDIA_PATH = '/static/editor/'
CATEGORIES_ALLOW_SLUG_CHANGE = True