Opened 14 years ago

Closed 10 years ago

#13128 closed New feature (wontfix)

Fixture docs could be more clear.

Reported by: Oroku Saki Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords: fixtures, initial_data
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

At http://docs.djangoproject.com/en/dev/howto/initial-data/#automatically-loading-initial-data-fixtures

The docs mention creating initial_data.[format], etc for auto-popping data during manage.py syncdb. The docs don't make mention of where to place this file. If they can go anywhere it might be better to mention that, as well as mention where the search begins. I would want to put it there, for convention, and efficiency (if it makes a difference for speed).

On a related note,the manage.py loaddata fixturename appears (I haven't used it yet) to be able to accept multiple files. This might be useful in separating fixtures by application. The initial_data, on cursory glance, doesn't appear from the docs to work this way. Having not used either method, I would be at the mercy of trial and error to see if this is correct. It might be good to mention in both versions (loaddata, and the initial_data version) if you can have multiple fixture files, whether they can exist anywhere, and where they might be best placed.

Change History (6)

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

I think this is a case of needing to reorganizing the documentation we already have, rather than adding new documentation. All the documentation features you have requested are present - they're just not linked together very well. The initial-data docs say that "You'll store this data in a fixtures directory inside your app."; The loaddata docs also contain lots of useful information on how fixtures are loaded. However, this fixture loading information could certainly be pulled out into a separate topic guide, which could be referenced from lots of places (discussion of initial_data and test fixtures to name just 2).

As for the second part of this ticket - I'm going to ignore it. You should only ever include one concrete idea or suggestion per ticket. I'm also completely uncertain what problem you're describing. If you want to pursue the 'multiple file' issue, please open a second ticket.

comment:2 by Luke Plant, 13 years ago

Type: New feature

comment:3 by Luke Plant, 13 years ago

Severity: Normal

comment:4 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by Tim Graham, 10 years ago

Resolution: wontfix
Status: newclosed

Initial loading of fixture data is deprecated so closing this ticket.

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