[Django] #26975: Unclear documentation: use of paths with loaddata

5 views
Skip to first unread message

Django

unread,
Jul 31, 2016, 1:49:57 PM7/31/16
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------+--------------------
Reporter: ancientHacker | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/26975>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 31, 2016, 1:52:58 PM7/31/16
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------+--------------------------------------

Reporter: ancientHacker | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by ancientHacker):

* 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>

Django

unread,
Aug 1, 2016, 8:04:02 AM8/1/16
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------+------------------------------------

Reporter: ancientHacker | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:2>

Django

unread,
Aug 5, 2016, 1:45:23 PM8/5/16
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------+------------------------------------

Reporter: ancientHacker | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* 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>

Django

unread,
Aug 6, 2016, 3:27:48 AM8/6/16
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------+------------------------------------

Reporter: ancientHacker | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

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>

Django

unread,
Sep 25, 2022, 6:20:04 AM9/25/22
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
--------------------------------+------------------------------------
Reporter: Daniel Brotsky | Owner: nobody

Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------

Comment (by Filip Łajszczak):

Has new PR [https://github.com/django/django/pull/16104]

--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:5>

Django

unread,
Sep 25, 2022, 9:16:32 AM9/25/22
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
--------------------------------+------------------------------------
Reporter: Daniel Brotsky | Owner: nobody

Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------

Comment (by Filip Łajszczak):

See also possible follow up #34064

--
Ticket URL: <https://code.djangoproject.com/ticket/26975#comment:6>

Django

unread,
Sep 25, 2022, 2:59:03 PM9/25/22
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------------+-------------------------------------
Reporter: Daniel Brotsky | Owner: Filip
| Łajszczak
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* 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>

Django

unread,
Sep 25, 2022, 11:55:31 PM9/25/22
to django-...@googlegroups.com
#26975: Unclear documentation: use of paths with loaddata
-------------------------------------+-------------------------------------
Reporter: Daniel Brotsky | Owner: Filip
| Łajszczak
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages