Re: get_or_create IntegrityError

2017-02-16 Thread Vijay Khemlani
As far as I know Postgres uses "sequences" for generating the model IDs. If you set the id manually I think you are bypassing the sequence, which doesn't autoincrement. So when you use the sequence the next time the ID clashes. pgAdmin should auto generate the id if you leave the field blank. On

get_or_create IntegrityError

2017-02-16 Thread Matthew Pava
This is a fascinating issue, fellow Django users. I have a model called Lookups that is basically just an auto-generated pk and a name. I added some data to that table using pgAdmin 3 since I'm using a PostgreSQL backend. One of my users then filled out a form that ran some code that would 'ge