Oh! I'm using MYSQL and I just realised that there was an option to
set the field unique in there. I hadn't put "unique=True" when I first
ran syncdb... so it was not taken into account after I later added it
in the model definition.
Thanks!
On Apr 2, 5:42 pm, Kenneth Gonsalves <[EMAIL PROTECTED
On 02-Apr-08, at 12:03 PM, Julien wrote:
> get() returned more than one Project -- it returned 2! Lookup
> parameters were {'slug__exact': u'hello'}
>
> I have the same issue on the front end using ModelForm.
>
> Shouldn't that raise an IntegrityError, and then reload the form page
> with an err
Sorry, above I meant "I would NOT get an IntegrityError but the
following:..."
On Apr 2, 5:33 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have a slug field which I'd like to be unique, so I do like this:
>
> class Project(models.Model):
> slug = models.SlugField(_('bla'), max_leng
Hi there,
I have a slug field which I'd like to be unique, so I do like this:
class Project(models.Model):
slug = models.SlugField(_('bla'), max_length=50, blank=True,
unique=True, help_text=_('blabla'))
In admin, if I saved a project with the slug 'hello', and then saved
another one with t
4 matches
Mail list logo