categorys slug start with category
This commit is contained in:
@@ -23,7 +23,7 @@ class MainCategoryModel(models.Model):
|
|||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if not self.slug:
|
if not self.slug:
|
||||||
self.slug = slugify(self.name, allow_unicode=True)
|
self.slug = 'category-' + slugify(self.name, allow_unicode=True)
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user