Opened 8 years ago

Last modified 20 months ago

#26975 closed Bug

Unclear documentation: use of paths with loaddata — at Initial Version

Reported by: Daniel Brotsky Owned by: nobody
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The howto on fixtures [1] states that providing a path to loaddata overrides the usual search, but in fact this is only true of an absolute path. Relative paths to fixture files can be used to namespace them as with templates and static files.

I suggest that the docs be updated to clarify this point about paths and to add namespacing advice for fixture files analogous to that for templates [2] and static files [3]. I have prepared a pull request [4] with a suggested fix.

References:
[1] https://docs.djangoproject.com/en/1.9/howto/initial-data/#where-django-finds-fixture-files
[2] https://docs.djangoproject.com/en/1.9/howto/static-files/#configuring-static-files
[3] https://docs.djangoproject.com/en/1.9/intro/tutorial03/
[4] https://github.com/django/django/pull/6996

Change History (0)

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