Opened 7 years ago
Closed 12 months 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 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 follow-up: 4 Changed 7 years ago by
Patch needs improvement: | set |
---|
comment:4 Changed 7 years ago by
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:7 Changed 12 months ago by
Owner: | changed from nobody to Filip Łajszczak |
---|---|
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.