naftulikay / django-locality

django-locality is a Django application which provides countries and territories as native Django models.
Other
22 stars 15 forks source link

Move initial_data.json to locality.json #7

Closed supervacuo closed 10 years ago

supervacuo commented 10 years ago

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:

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.