1. Andy Mikhailenko
  2. django-autoslug
  3. Issues

Issues

Issue #3 resolved

slug can exceed field length if prepopulating from longer field

Oliver Rutherfurd
created an issue

If autoslug field is prepopulating from another field whose length is greater than the autoslug field's length it's possible to end up with slug values too long for the slug field. {{{

!python

class Foo(models.Model): name = models.CharField(max_length=200) slug = autoslug.AutoSlugField(prepopulate_from='name', unique=True)

}}}

It would be nice if the autoslug field would truncate the slug value so that it's not too long for the field.

Comments (1)

  1. Log in to comment