On Aug 19, 2:05 pm, Lee wrote:
> Landy - thanks for that idea. Am I correct in understanding that
> setting a field to AutoField has no effect on save_model, and simply
> causes dbsync to add the sequence/nextval to the Postgres table?
I am not sure; On a droid phone so I can't look at the sour
Landy - thanks for that idea. Am I correct in understanding that
setting a field to AutoField has no effect on save_model, and simply
causes dbsync to add the sequence/nextval to the Postgres table? If so
that is my problem, because I want to have one database schema that
works across different DBM
Did you create the table using django?
Can you post the table definition in postgresql?
If you still have an empty database, you could try dropping the id
column and do a django dbsync
otherwise you may have to create a sequence and apply it to the id
field. Something along the lines of:
creat
<>
Did so -- no effect. I even disabled my overridden save_model so I'm
back to out-of-the-box Admin setup -- no effect. This is with Postgres
and the psycopg2 driver. Is no one else seeing this problem?
On Aug 18, 5:32 pm, Shawn Milochik wrote:
> As defined your id field doesn't differ from Dja
As defined your id field doesn't differ from Django's default. Just get
rid of your custom id field.
--
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 g
In my model I have
id = models.AutoField(primary_key=True)
but upon saving a new record I get
null value in column "id" violates not-null constraint
I suspect this may be caused by my overriding save_model in admin.py to
populate timestamp fields:
def save_model(self, request, obj, form, cha
6 matches
Mail list logo