On Wed, Apr 8, 2009 at 10:27 PM, Adam Nelson <a...@varud.com> wrote:
>
> Is there any way to ignore fixtures when running syncdb?  I'm using
> django-command-extensions and when using runscript from a previous
> datadump, I get a unique index violation.  I'd like to be able to
> ignore fixture imports.

1) Yes - you don't call your fixture initial_data. Any other name will
result in a perfectly loadable fixture, but that fixture won't be
automatically loaded.

2) If you're getting unique index violations from a fixture created by
dumpdata, i'll wager you're hitting #7052. The solution here is to
avoid dumping the auth permissions and contenttype datatypes as part
of the datadump, or to delete the entries corresponding to permissions
and contenttypes from your fixture. This may pose problems if your
data contains generic keys, or any foreign keys on the auth
permissions or content types, but otherwise you should be fine.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to