Code

Opened 4 years ago

Closed 2 months ago

#13128 closed New feature (wontfix)

Fixture docs could be more clear.

Reported by: orokusaki Owned by: nobody
Component: Documentation Version: master
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.

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 3 years ago by lukeplant

  • Type set to New feature

comment:3 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:4 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 2 months ago by timo

  • Resolution set to wontfix
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.