mirror of https://github.com/snachodog/mybuddy.git
child slugs: require non-blank
Currently it is easy for a child with non-ascii name to get empty slug: 'Мааян' 'Паскин-Чернявский' => '-' 'Мааян' 'Паскин' => '' Once any child has an empty slug, many pages break with NoReverseMatch errors. This commit at least prevents setting such names; slug computation to be fixed later.
This commit is contained in:
parent
14b11db91b
commit
f58571bf17
|
@ -80,6 +80,7 @@ class Child(models.Model):
|
|||
verbose_name=_('Birth date')
|
||||
)
|
||||
slug = models.SlugField(
|
||||
blank=False,
|
||||
editable=False,
|
||||
max_length=100,
|
||||
unique=True,
|
||||
|
|
Loading…
Reference in New Issue