rfkrocktk/django-locality — pull request #7 by supervacuo (2014-02-18 13:11:35+00:00)
Title: Move initial_data.json to locality.json

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.