However, the documentation for the
[`TemplatesSetting`](https://docs.djangoproject.com/en/1.11/ref/forms/renderers/#templatessetting)
class tells us:
> Adding the built-in widgets templates directory
(**django/forms/templates** or **django/forms/jinja2**) in `DIRS` of one
of your template engines.
That is, it says to add a relative path to the `DIRS` setting, which
contradicts the documentation for `DIRS`.
--
Ticket URL: <https://code.djangoproject.com/ticket/28102>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* easy: 0 => 1
* stage: Unreviewed => Accepted
Old description:
> The documentation for the
> [`DIRS`](https://docs.djangoproject.com/en/1.11/ref/templates/api/#the-
> dirs-option) template setting states that
> > This should be set to a list of strings that contain **full paths** to
> your template directories
>
> However, the documentation for the
> [`TemplatesSetting`](https://docs.djangoproject.com/en/1.11/ref/forms/renderers/#templatessetting)
> class tells us:
> > Adding the built-in widgets templates directory
> (**django/forms/templates** or **django/forms/jinja2**) in `DIRS` of one
> of your template engines.
> That is, it says to add a relative path to the `DIRS` setting, which
> contradicts the documentation for `DIRS`.
New description:
The documentation for the
[https://docs.djangoproject.com/en/stable/ref/templates/api/#the-dirs-
option DIRS] template setting states that
> This should be set to a list of strings that contain **full paths** to
your template directories
However, the documentation for the
[https://docs.djangoproject.com/en/stable/ref/forms/renderers/#templatessetting
TemplatesSetting] class tells us:
> Adding the built-in widgets templates directory
(**django/forms/templates** or **django/forms/jinja2**) in `DIRS` of one
of your template engines.
That is, it says to add a relative path to the `DIRS` setting, which
contradicts the documentation for `DIRS`.
--
Comment:
The `TemplatesSetting` docs could be more explicit and include an example
of how to compute the full path to Django's built-in widget directories.
The same confusion was also raised in #28088.
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:1>
* owner: nobody => Windson yang
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:2>
Comment (by Windson yang):
I pull request here https://github.com/django/django/pull/8513 but failed
at doc test, any idea? Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:3>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"7f238097c0614707d6ee3fffbaf76f111b2fd38d" 7f23809]:
{{{
#!CommitTicketReference repository=""
revision="7f238097c0614707d6ee3fffbaf76f111b2fd38d"
Fixed #28102 -- Doc'd how to compute path to built-in widget template
directories.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b373812b0bb4654e049ccf6a60e92a7e9f603a99" b373812b]:
{{{
#!CommitTicketReference repository=""
revision="b373812b0bb4654e049ccf6a60e92a7e9f603a99"
[1.11.x] Fixed #28102 -- Doc'd how to compute path to built-in widget
template directories.
Backport of 7f238097c0614707d6ee3fffbaf76f111b2fd38d from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28102#comment:6>