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
--
Ticket URL: <https://code.djangoproject.com/ticket/26975>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0
Old 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
New 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/intro/tutorial03/ \\
[3] https://docs.djangoproject.com/en/1.9/howto/static-files/#configuring-
static-files \\
[4] https://github.com/django/django/pull/6996
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:1>
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:2>
* needs_better_patch: 0 => 1
Comment:
Left an idea for improvement on the PR. Please uncheck "Patch needs
improvement" when you update it.
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:3>
Comment (by ancientHacker):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:4>
Comment (by Filip Łajszczak):
Has new PR [https://github.com/django/django/pull/16104]
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:5>
Comment (by Filip Łajszczak):
See also possible follow up #34064
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:6>
* owner: nobody => Filip Łajszczak
* needs_better_patch: 1 => 0
* status: new => assigned
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"fe6f4bef037ca3c8a5f8ddf4002dcee6ccf7e86d" fe6f4be]:
{{{
#!CommitTicketReference repository=""
revision="fe6f4bef037ca3c8a5f8ddf4002dcee6ccf7e86d"
Fixed #26975 -- Clarified how Django looks for fixture files.
Co-Authored-By: Daniel Brotsky <d...@brotsky.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:8>