diff options
| author | David Smith <smithdc@gmail.com> | 2022-11-02 20:13:16 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-24 10:16:30 +0100 |
| commit | cad376f844c7bdeeee7607a7c0ea8ae52061309b (patch) | |
| tree | 674bcfb8a4b99c752bff23c029494987ed62f5ef /docs/ref/forms/fields.txt | |
| parent | d33368b4ab6ae0c01e83d525f7e1655156a640d1 (diff) | |
Fixed #34077 -- Added form field rendering.
Diffstat (limited to 'docs/ref/forms/fields.txt')
| -rw-r--r-- | docs/ref/forms/fields.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 7d975a74d5..476075b936 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -337,6 +337,19 @@ using the ``disabled`` HTML attribute so that it won't be editable by users. Even if a user tampers with the field's value submitted to the server, it will be ignored in favor of the value from the form's initial data. +``template_name`` +----------------- + +.. attribute:: Field.template_name + +.. versionadded:: 5.0 + +The ``template_name`` argument allows a custom template to be used when the +field is rendered with :meth:`~django.forms.BoundField.as_field_group`. By +default this value is set to ``"django/forms/field.html"``. Can be changed per +field by overriding this attribute or more generally by overriding the default +template, see also :ref:`overriding-built-in-field-templates`. + Checking if the field data has changed ====================================== |
