Gábor Farkas wrote: > hi, > > i've just checked and SlugField does not imply unique=True. > > i somehow always assumed that it does. > > so before i go and add the unique=True to all my SlugFields, > > is there any reason to have non-unique SlugFields? > > as far as i understand, SlugFields are mostly used in URLs.... which > imho implies that they need to be unique... > > > gabor
Gabor, Remember that just adding unique=True won't fix the DB as this is a database contstraint, not Python logic. You'll need to resync, or if you have data you need to preserve, use the alter table statement, like this (on MySQL): alter table myapp_mymodel modify my_slug_field varchar(100) not null unique; -Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---