Opened 8 years ago
Closed 2 years ago
#26975 closed Bug (fixed)
Unclear documentation: use of paths with loaddata
Reported by: | Daniel Brotsky | Owned by: | Filip Łajszczak |
---|---|---|---|
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 (last modified by )
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/intro/tutorial03/
[3] https://docs.djangoproject.com/en/1.9/howto/static-files/#configuring-static-files
[4] https://github.com/django/django/pull/6996
Change History (8)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
follow-up: 4 comment:3 by , 8 years ago
Patch needs improvement: | set |
---|
comment:4 by , 8 years ago
I am happy to improve the patch, but have in mind a slightly different approach, and would like your opinion. Please see the PR for details.
comment:6 by , 2 years ago
See also possible follow up #34064
comment:7 by , 2 years ago
Owner: | changed from | to
---|---|
Patch needs improvement: | unset |
Status: | new → assigned |
Triage Stage: | Accepted → Ready for checkin |
Left an idea for improvement on the PR. Please uncheck "Patch needs improvement" when you update it.