I'm running Django 1.7. My file tree for the project is as such:
/project/app/fixtures/initial_data.json
/project/app/settings.py
I know I can run the python manage.py loaddata app/fixtures/initial_data.json
command that will work for populating my database but I want to load it automatically when python manage.py migrate
is run. My settings include:
FIXTURE_DIRS = (
os.path.join(BASE_DIR, '/app/fixtures/'),
)
But the fixture is not applied when migrate is run. What seems to be the problem?
execute_from_command_line(['manage.py', "loaddata", "my_specific_fixture_name.json"])
– Quinton