{{{
{
"fields": {
"registration_required": false,
"title": "foo",
"url": "/url/",
"template_name": "",
"sites": [1],
"content": "bar",
"enable_comments": false
},
"model": "flatpages.flatpage",
"pk": 1
}
}}}
running "manage.py migrate" on new DB will result in:
{{{
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: Problem installing fixture
'/home/user/project/fixtures/initial_data.json': Could not load
flatpages.FlatPage(pk=1): no such table: django_flatpage
}}}
This breaks DB creation on "manage.py test" as well.
Correct behaviour would be to install initial_data.json AFTER tables for
apps with migrations are created as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/23988>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Initial data isn't supported for apps with migrations, see
https://docs.djangoproject.com/en/1.7/howto/initial-data/#automatically-
loading-initial-data-fixtures.
--
Ticket URL: <https://code.djangoproject.com/ticket/23988#comment:1>