[BangPypers] Reseting contenttype for dumpdata/loaddata

ashok raavi ashok.raavi at gmail.com
Wed Jul 20 02:22:17 CEST 2011


On Tue, Jul 19, 2011 at 3:17 PM, Amit Sethi <amit.pureenergy at gmail.com>wrote:

> Hi All,
> I am having trouble loading Django fixtures into my database because
> of contenttypes conflicts. Some of the data i need has foreignkey
> elements in the contenttypes model.
>
> Apparently the problem is that django  dynamically tries to populate
> the content-types table. But if we put data into the table, the
> primary keys  clash. Anybody knows a workaround for this.
>

Use --natural option,
https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-option---natural
,
while dumping data.


> --
> A-M-I-T S|S
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
ashok raavi


More information about the BangPypers mailing list