Fixtures called "initial_data" are loaded whenever you run syncdb, replacing
existing data. So, in exchange for adding a "loaddata" command to the setup
instructions, this commit adds support for:
persistent user changes to locality.Country or locality.Territory
objects (which would otherwise be lost every time syncdb is called)
a project-specific fixture containing locality.Country and
locality.Territory objects
This second case is useful in scenarios where you need to extend the provided
locality models -- our project monkey-patches a continent field onto
locality.Country, and this commit allows us to load our own fixture (with
"continent" specified for each country) where previously we hit duplicate pk
errors.
Fixtures called "initial_data" are loaded whenever you run
syncdb
, replacing existing data. So, in exchange for adding a "loaddata" command to the setup instructions, this commit adds support for:locality.Country
orlocality.Territory
objects (which would otherwise be lost every timesyncdb
is called)locality.Country
andlocality.Territory
objectsThis second case is useful in scenarios where you need to extend the provided
locality
models -- our project monkey-patches acontinent
field ontolocality.Country
, and this commit allows us to load our own fixture (with "continent" specified for each country) where previously we hit duplicate pk errors.