Links:
1.10: https://docs.djangoproject.com/en/1.10/howto/initial-data/
1.8: https://docs.djangoproject.com/en/1.8/howto/initial-data/
--
Ticket URL: <https://code.djangoproject.com/ticket/27133>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Migrations => Documentation
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Is the deprecation note and the explanation in the 1.7 release notes
unclear?
If an application uses migrations, there is no automatic loading of
fixtures. Since migrations will be required for applications in Django
1.9, this behavior is considered deprecated. If you want to load initial
data for an app, consider doing it in a data migration.
`initial_data` fixtures are no longer loaded for apps with migrations; if
you want to load initial data for an app, we suggest you create a
migration for your application and define a `RunPython` or `RunSQL`
operation in the operations section of the migration.
`manage.py loaddata <fixturename>` still works fine but it doesn't happen
automatically. #24778 is a ticket about possibly allowing migrations to
load fixtures.
Maybe you could propose a documentation clarification as I'm not exactly
sure what would be helpful to clarify your doubt.
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:2>
* owner: nobody => Krzysztof Żuraw
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:3>
* has_patch: 0 => 1
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/7506 PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:4>
* stage: Ready for checkin => Accepted
Comment:
Hi, you shouldn't mark your own patch "Ready for Checkin", rather a
separate reviewer should do that.
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:5>
* stage: Accepted => Ready for checkin
Comment:
Reviewed - it looks fine.
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"eaa6ea2f37509f2e54de5268f32469deeff89eb9" eaa6ea2f]:
{{{
#!CommitTicketReference repository=""
revision="eaa6ea2f37509f2e54de5268f32469deeff89eb9"
Fixed #27133 -- Doc'd how to provide initial data with migrations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"07db0e068fbf5c74600acfdc7d6891df2ade7243" 07db0e0]:
{{{
#!CommitTicketReference repository=""
revision="07db0e068fbf5c74600acfdc7d6891df2ade7243"
[1.10.x] Fixed #27133 -- Doc'd how to provide initial data with
migrations.
Backport of eaa6ea2f37509f2e54de5268f32469deeff89eb9 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27133#comment:8>