From 9c88826ff9724c6bb42d403a7f436de6f51ed553 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 11 Sep 2018 13:14:53 -0600 Subject: [2.1.x] Emphasized that TemplatesSetting must be used to override widget templates. Backport of 25f4302349db71d73a15ff8f3872956fc21a0f84 from master --- docs/ref/forms/renderers.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/renderers.txt b/docs/ref/forms/renderers.txt index 71f0661f94..58caa08c32 100644 --- a/docs/ref/forms/renderers.txt +++ b/docs/ref/forms/renderers.txt @@ -114,6 +114,8 @@ Some widgets add further information to the context. For instance, all widgets that subclass ``Input`` defines ``widget['type']`` and :class:`.MultiWidget` defines ``widget['subwidgets']`` for looping purposes. +.. _overriding-built-in-widget-templates: + Overriding built-in widget templates ==================================== @@ -123,6 +125,6 @@ Each widget has a ``template_name`` attribute with a value such as ``input.html`` by defining ``django/forms/widgets/input.html``, for example. See :ref:`built-in widgets` for the name of each widget's template. -If you use the :class:`TemplatesSetting` renderer, overriding widget templates -works the same as overriding any other template in your project. You can't -override built-in widget templates using the other built-in renderers. +To override widget templates, you must use the :class:`TemplatesSetting` +renderer. Then overriding widget templates works :doc:`the same as +` overriding any other template in your project. -- cgit v1.3