I propose that the documentation be moved from '''Settings''' page to
'''Managing Static Files''' page and add a link from the former to the
latter. A quicker alternative would be the other way round.
--
Ticket URL: <https://code.djangoproject.com/ticket/31126>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
IMO both docs are in the right places, moreover `howto/static-
files/index.txt` mentions namespaces in the `Static file namespacing`
admonition. Nevertheless adding a cross reference to the
`docs/ref/settings.txt` seems like a good idea, e.g.
{{{
--- a/docs/howto/static-files/index.txt
+++ b/docs/howto/static-files/index.txt
distinguish between them. We need to be able to point Django at the
right
- one, and the best way to ensure this is by *namespacing* them. That
is,
- by putting those static files inside *another* directory named for
the
- application itself.
+ one, and the best way to ensure this is by :ref:`namespacing them
+ <staticfiles-dirs-prefixes>`. That is, by putting those static files
inside
+ *another* directory named for the application itself.
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
+.. _staticfiles-dirs-prefixes:
+
Prefixes (optional)
~~~~~~~~~~~~~~~~~~~
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:1>
Old description:
> Currently, the '''Managing Static Files''' documentation page doesn't
> mention anything about namespaces (prefixes). It is logical to expect
> information regarding this on the page that deals with static files.
> However, the details are mentioned in Django '''Settings''' page under
> the setting.
>
> I propose that the documentation be moved from '''Settings''' page to
> '''Managing Static Files''' page and add a link from the former to the
> latter. A quicker alternative would be the other way round.
New description:
--
Comment (by Abhijeet):
Replying to [comment:1 felixxm]:
> IMO both docs are in the right places, moreover `howto/static-
files/index.txt` mentions namespaces in the `Static file namespacing`
admonition. Nevertheless adding a cross reference to the
`docs/ref/settings.txt` seems like a good idea, e.g.
> {{{
> --- a/docs/howto/static-files/index.txt
> +++ b/docs/howto/static-files/index.txt
> distinguish between them. We need to be able to point Django at the
right
> - one, and the best way to ensure this is by *namespacing* them. That
is,
> - by putting those static files inside *another* directory named for
the
> - application itself.
> + one, and the best way to ensure this is by :ref:`namespacing them
> + <staticfiles-dirs-prefixes>`. That is, by putting those static
files inside
> + *another* directory named for the application itself.
>
> --- a/docs/ref/settings.txt
> +++ b/docs/ref/settings.txt
>
> +.. _staticfiles-dirs-prefixes:
> +
> Prefixes (optional)
> ~~~~~~~~~~~~~~~~~~~
> }}}
The `Static file namespacing` admonition in `howto/static-files/index.txt`
mentions namespaces in relation with static files for a particular app
(`my_app/static`). I am talking about prefixes in context of
`FileSystemFinder` and the `STATICFILE_DIRS` setting.
The reason why I speak of prefixes in particular is because I had a
particular case where I needed them to be served as static files and at
the same time include them in a meaningful directory structure of my code
repository. The default action is the contents of the files are moved to
the `STATIC_ROOT` folder. Using prefixes meant I could namespace the
static files properly and hence link to them (from outside templates)
using straight forward and intutive links.
I'll have a patch ready by tonight.
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:2>
Old description:
New description:
Currently, the '''Managing Static Files''' documentation page doesn't
mention anything about namespaces (prefixes). It is logical to expect
information regarding this on the page that deals with static files.
However, the details are mentioned in Django '''Settings''' page under the
setting.
I propose that the documentation be moved from '''Settings''' page to
'''Managing Static Files''' page and add a link from the former to the
latter. A quicker alternative would be the other way round.
--
Comment (by Abhijeet):
I removed the description in my previous comment by mistake. Sorry for
that.
Adding it back in here.
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:3>
* has_patch: 0 => 1
Comment:
Patch: https://github.com/django/django/pull/12261
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a45c8d7ad04b73e33b6989c3ffa2b8c51ae3e83b" a45c8d7a]:
{{{
#!CommitTicketReference repository=""
revision="a45c8d7ad04b73e33b6989c3ffa2b8c51ae3e83b"
Fixed #31126 -- Doc'd STATICFILES_DIRS namespacing in static files how-to.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:5>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"7d48a4b703b24607ea77e8c1074d832dfdbdf832" 7d48a4b7]:
{{{
#!CommitTicketReference repository=""
revision="7d48a4b703b24607ea77e8c1074d832dfdbdf832"
[3.0.x] Fixed #31126 -- Doc'd STATICFILES_DIRS namespacing in static files
how-to.
Backport of a45c8d7ad04b73e33b6989c3ffa2b8c51ae3e83b from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31126#comment:6>