Opened 7 years ago

Closed 7 years ago

#12204 closed (fixed)

Documentation is not clear on naming/loading of test fixtures

Reported by: Art_S Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Documentation ( does not provide any hints on the mechanism of fixture loading.

For instance, it does not explicitly say that all fixtures from all applications matching the names given in instance's 'fixtures' field are loaded, somewhat similar to template resolution mechanism.

While this behaviour is perfectly inline with django's philosophy, it is worth mentioning this particular issues in the documentation.


Change History (4)

comment:1 Changed 7 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

The documentation you refer to includes the following text:

"Then, all the named fixtures are installed. In this example, Django will install any JSON fixture named mammals, followed by any fixture named birds. See the loaddata documentation for more details on defining and installing fixtures."

The loaddata documentation describes in detail the fixture loading process.

comment:2 Changed 7 years ago by Art_S

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Loaddata does describe it indeed, though there is no direct link to it, just mentioning. Should be a href.

Also, imho, this particular issue also deserves to be briefly mentioned on this page as well, so people assigning same names to fixtures and then wondering why they getting all sorts of weird errors.

comment:3 Changed 7 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

Let this be a lesson in actually looking at the rendered output - I looked at the documentation source, and it *is* marked up as a link. Unfortunately, the other end of the link isn't defined. I'll commit a fix soon.

As for whether the issue should be raised - I disagree. We direct people to the documentation that describes exactly how fixtures are loaded; we can't compensate for the fact that people don't read documentation by duplicating documentation.

comment:4 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11734]) Fixed #12204 -- Corrected the use of :djadmin: links in the testing docs, plus updated a lot of old-style markup in the django-admin docs. Thanks to Art_S for the report.

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