Ticket #827 (closed defect: wontfix)
Because initial_data loads before all apps have migrated, can't use initial_data fixtures which contain references to other apps
|Reported by:||jim.dalton@…||Owned by:||andrew|
This is similar to #372, but slightly different.
I have some initial data in one app that loads data for models in other apps. (While this may sound like a Very Bad Idea, the app in question is at the "project" level, and loads project-specific data (which varies from project to project) for several dependent apps). This works fine during test runs when not using South, since Django first creates the data tables and then loads the initial data.
In South, it appears (if I'm not mistaken) that the order is slightly different. It installs each app, and then loads initial data for that app. So when I run my tests, the initial data I'm trying to load is not working because the app for some of that data has not been migrated yet.
I'd consider this a defect since the behavior is different from what works in Django, but if there is a workaround or I'm missing something please do mention it.