Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#22444 closed Bug (fixed)

conflicting docs regarding initial_data loading

Reported by: Karen Tracey Owned by: nobody
Component: Documentation Version: 1.7-beta-1
Severity: Release blocker Keywords:
Cc: Tim Graham Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/dev/releases/1.7/#schema-migrations states "initial_data fixtures are no longer loaded for apps with migrations; if you want to load initial data for an app, we suggest you do it in a migration."

However https://docs.djangoproject.com/en/1.7/howto/initial-data/#automatically-loading-initial-data-fixtures states: "If you create a fixture named initial_data.[xml/yaml/json], that fixture will be loaded every time you run migrate. This is extremely convenient, but be careful: remember that the data will be refreshed every time you run migrate. So don’t use initial_data for data you’ll want to edit."

I'm assuming, given the first statement in the release notes, that the 2nd only applies to applications without migrations? That 2nd citation needs to be updated to make it clear that this ONLY applies to apps without migrations (which may come across rather oddly...run migrate to load your initial data for apps w/out migrations...but I assume that IS the case?)

Attachments (1)

22444.diff (881 bytes ) - added by Tim Graham 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Baptiste Mispelon, 11 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

Just did a quick test and indeed, the fixture is not installed if the app uses migrations but it gets installed if the migrations folder is removed.

by Tim Graham, 11 years ago

Attachment: 22444.diff added

comment:2 by Tim Graham, 11 years ago

Cc: Tim Graham added
Has patch: set

comment:3 by Tim Graham, 11 years ago

I believe "Providing initial SQL data" should also be marked as deprecated for the same reasons.

comment:4 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In a4acb804634af17cfd9ee7070ec3865d7cc2a7a3:

Fixed #22444 -- Marked initial SQL/fixture loading as deprecated.

Thanks Karen Tracey for the report.

comment:5 by Tim Graham <timograham@…>, 11 years ago

In 22cbaea9c7f3eeeda4a8570278910f879449ddb9:

[1.7.x] Fixed #22444 -- Marked initial SQL/fixture loading as deprecated.

Thanks Karen Tracey for the report.

Backport of a4acb80463 from master

Note: See TracTickets for help on using tickets.
Back to Top