Re: 'unique' field upon inserting

2011-01-25 Thread Patrick McDonnell
On Tue, Jan 25, 2011 at 10:28 AM, Jonas Geiregat wrote: > The id field (which is added by django by default has this) other then that > the field doesn't have unique=True > > I was also thinking of a better solution. > > I have a Gig model which contains gigs with a ForeignKey to Artist. > I have

Re: 'unique' field upon inserting

2011-01-25 Thread Jonas Geiregat
The id field (which is added by django by default has this) other then that the field doesn't have unique=True I was also thinking of a better solution. I have a Gig model which contains gigs with a ForeignKey to Artist. I have a Artist model which contains artists. One Gig can have multiple ar

Re: 'unique' field upon inserting

2011-01-25 Thread kmpm
I don't know if this will make you happy but when I researched this some months ago I found no good solution. During my search I came upon the following pages that sort of relate to this... - http://github.com/dcramer/django-idmapper - http://appengine-cookbook.appspot.com/recipe/hi

Re: 'unique' field upon inserting

2011-01-25 Thread Shawn Milochik
Do you have 'unique = True' in the field definition in the model? -- 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 django-users+uns

'unique' field upon inserting

2011-01-25 Thread Jonas Geiregat
Hello, I have a model that has a field of the type BigIntegerField(). When inserting something into that field the value must not have been used before but upon inserting it's possible to insert the same value twice. Is there a way to do this using django ? I could generate a random number ch