Djangoids:

Does the data fixture support automatically generated primary keys?

We need to add a tiny stretch of new data to an existing website. A
fixture, such as new_data.json, would work great for both the new data
and for their new feature's unit tests. Then we would just run
loaddata on the server.

However, the fixture format seems to require hard-coded PKs. So we
should not risk overwriting (or skipping?) any preexisting live data.

I could code around this, either by looking up the current PKs and
then moving the new ones to miss them, or by writing a README.txt file
explaining how to add the same data thru the Admin. But this would
seem to be a systemic problem with fixtures, so I was curious if they
had a systemic solution.

--
  Phlip
  http://c2.com/cgi/wiki?MoreliaViridis

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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