Added some params
This commit is contained in:
parent
5a18be4584
commit
c5bfdb9cde
|
|
@ -81,7 +81,7 @@ class Collection(ProjectBaseMixin, CollectionDateMixin,
|
|||
description = TJSONField(
|
||||
_('description'), null=True, blank=True,
|
||||
default=None, help_text='{"en-GB":"some text"}')
|
||||
slug = models.SlugField(max_length=50, unique=True,
|
||||
slug = models.SlugField(max_length=255, unique=True,
|
||||
verbose_name=_('Collection slug'), editable=True, null=True)
|
||||
old_id = models.IntegerField(null=True, blank=True)
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ class Collection(ProjectBaseMixin, CollectionDateMixin,
|
|||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.pk:
|
||||
slugify_slug = slugify(self.name)
|
||||
slugify_slug = slugify(self.name, word_boundary=True)
|
||||
self.slug = slugify_slug
|
||||
super(Collection, self).save(*args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user