slug can exceed field length if prepopulating from longer field
Issue #3
resolved
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)
-
repo owner - Log in to comment
Thanks for your report! Fixed in Wiki macro error: Changeset d0933d7a5caa310786d57ed35e318a7a72b06f13 not found.. I've also added your test case (with minor changes), more to come when I get some spare tuits =)