Mariusz Felisiak
92af3d4d23
[5.0.x] Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.
...
This allows early adoption of the new default "https".
Backport of a4931cd75a
from main.
2023-11-28 20:08:10 +01:00
Adam Johnson
4c74dff759
[5.0.x] Refs #34380 -- Improved docs for forms.URLField.assume_scheme.
...
Backport of 0203771b62
from main
2023-11-25 18:53:34 +01:00
David Smith
7f0275d8cb
[5.0.x] Refs #32819 -- Used auto_id instead of id_for_label as unique identifier for the field.
...
`id_for_label` is blank for widgets with multiple inputs such as radios
and multiple checkboxes. Therefore , `help_text` for fields using these
widgets cannot currently be associated using `aria-describedby`.
`id_for_label` is being used as a guard to avoid incorrectly adding
`aria-describedby` to those widgets.
This change uses `auto_id` as the unique identified for the fields
`help_text`. A guard is added to avoid incorrectly adding
`aria-describedby` to inputs by checking the widget's `use_fieldset`
attribute. Fields rendered in a `<fieldset>` should have
`aria-describedby` added to the `<fieldset>` and not every `<input>`.
Backport of 292f1ea90f
from main
2023-11-16 13:27:18 +01:00
Mariusz Felisiak
415ef34c4c
[5.0.x] Added missing pycon directives in various docs.
...
Backport of 718b32c691
from main
2023-10-25 12:27:56 +02:00
Nick Pope
500e01073a
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices.
2023-08-30 22:57:40 -03:00
Gregor Jerše
10725a3187
Fixed #32820 -- Added aria-invalid="true" to fields with errors.
...
Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: David Smith <smithdc@gmail.com>
2023-08-01 06:08:04 +02:00
David Sanders
f8c43aca46
Added reference to TypedChoiceField in ChoiceField docs.
2023-07-18 11:12:43 -03:00
Gregor Jerše
966ecdd482
Fixed #32819 -- Established relationship between form fields and their help text.
...
Thanks Nimra for the initial patch.
Thanks Natalia Bidart, Thibaud Colas, David Smith, and Mariusz Felisiak
for reviews.
2023-07-06 08:03:19 +02:00
Mariusz Felisiak
ad0410ec4f
Fixed CVE-2023-36053 -- Prevented potential ReDoS in EmailValidator and URLValidator.
...
Thanks Seokchan Yoon for reports.
2023-07-03 08:16:55 +02:00
Jacob Rief
1fe0b167af
Fixed #34473 -- Fixed step validation for form fields with non-zero minimum value.
2023-06-16 08:38:28 +02:00
sarahboyce
531f557f92
Fixed #23049 -- Added %a and %A support to Date.strftime.
...
This enables the admin to display the day as locale's abbreviated/full
name if %a/%A is used in the date format.
2023-06-09 12:18:17 +02:00
Coen van der Kamp
7bbbadc693
Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
...
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Edison Wang
cbcc1240e9
Fixed #34431 -- Improved Date/DateTimeField/TimeField.input_formats docs.
2023-04-03 06:58:25 +02:00
Mariusz Felisiak
659f6b5bc5
Fixed typos in docs/ref/forms/renderers.txt.
2023-03-24 12:54:47 +01:00
David Smith
cad376f844
Fixed #34077 -- Added form field rendering.
2023-03-24 10:16:30 +01:00
T. Franzel
a2eaea8f22
Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields.
2023-03-21 19:44:41 +01:00
django-bot
14459f80ee
Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
2023-03-01 13:03:56 +01:00
Joseph Victor Zammit
ba755ca131
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
2023-02-28 12:21:37 +01:00
David Smith
3cc7a92189
Refs #32339 -- Doc'd setting a form's template_name is recomended over using as_* methods.
2023-02-15 10:26:31 +01:00
David Smith
232b60a21b
Refs #32339 -- Updated docs to reflect default <div> style form rendering in Django 5.0.
...
Follow up to 98756c685e
.
2023-02-15 10:14:09 +01:00
Carlton Gibson
534ac48297
Refs #34140 -- Applied rst code-block to non-Python examples.
...
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for
reviews.
2023-02-10 19:19:13 +01:00
Mariusz Felisiak
b209518089
Refs #32339 -- Deprecated transitional form renderers.
2023-01-18 11:08:39 +01:00
Mariusz Felisiak
98756c685e
Refs #32339 -- Changed default form and formset rendering style to div-based.
...
Per deprecation timeline.
This also removes "django/forms/default.html" and
"django/forms/formsets/default.html" templates.
2023-01-17 11:49:15 +01:00
Mariusz Felisiak
31878b4d73
Refs #31026 -- Removed ability to return string when rendering ErrorDict/ErrorList.
...
Per deprecation timeline.
2023-01-17 11:49:15 +01:00
Mariusz Felisiak
8d98f99a4a
Refs #32873 -- Removed settings.USE_L10N per deprecation timeline.
2023-01-17 11:49:15 +01:00
Mariusz Felisiak
490cccbe7e
Removed versionadded/changed annotations for 4.1.
2023-01-17 11:49:15 +01:00
David Smith
9ac97e7eb5
Refs #32339 -- Updated Form API docs to prefer as_div() output style.
2022-12-07 10:49:45 +01:00
Ramil Yanbulatov
c6290bae9d
Fixed #33842 -- Used :source: role for links to repo files on GitHub.
2022-08-09 14:44:51 +02:00
Mariusz Felisiak
00370342ca
Fixed typo in docs/ref/forms/renderers.txt.
...
Thanks Josh for the report.
2022-08-06 13:43:16 +02:00
Swann
d0863429a3
Fixed documentation of Widget.id_for_label() empty return value.
2022-06-03 12:19:47 +02:00
Carlton Gibson
ca1c3151c3
Removed versionadded/changed annotations for 4.0.
2022-05-17 14:22:06 +02:00
David Smith
d126eba363
Refs #32339 -- Deprecated default.html form template.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-05-17 11:16:54 +02:00
Kapil Bansal
3a82b5f655
Fixed #32559 -- Added 'step_size’ to numeric form fields.
...
Co-authored-by: Jacob Rief <jacob.rief@uibk.ac.at>
2022-05-12 14:16:52 +02:00
David Smith
ec5659382a
Fixed #32339 -- Added div.html form template.
2022-05-05 14:32:43 +02:00
Carlton Gibson
fde946daff
Refs #32339 -- Restructured outputting HTML form docs.
...
In the topic doc, promoted the Reusable form templates section.
In the reference, re-grouped and promoted the default __str__()
rendering path, and then gathered the various as_*() helpers
subsequently.
Thanks to David Smith for review.
2022-05-04 11:52:48 +02:00
Alokik Vijay
df22566748
Fixed #33658 -- Doc'd ModelChoiceField.blank attribute.
...
Thanks Mariusz Felisiak for reviewing.
2022-05-03 14:23:00 +02:00
Carlton Gibson
476d4d5087
Refs #32339 -- Allowed renderer to specify default form and formset templates.
...
Co-authored-by: David Smith <smithdc@gmail.com>
2022-04-27 10:21:04 +02:00
Carlton Gibson
832096478c
Refs #32339 -- Added base form renderer to docs.
2022-04-27 10:21:04 +02:00
David
c8459708a7
Refs #32339 -- Added use_fieldset to Widget.
2022-03-30 16:28:14 +02:00
vgolubev
e87f57fdb8
Fixed #26142 -- Allowed model formsets to prevent new object creation.
...
Thanks Jacob Walls, David Smith, and Mariusz Felisiak for reviews.
Co-authored-by: parth <parthvin@gmail.com>
2022-01-27 20:45:21 +01:00
Mariusz Felisiak
ad6bb20557
Avoided counting attributes and methods in docs.
2021-12-28 12:36:57 +01:00
David Smith
78f062f63e
Refs #31026 -- Updated TemplatesSetting docs to refer to forms.
2021-12-22 08:03:47 +01:00
David Smith
eba9a9b7f7
Refs #32338 -- Added Boundfield.legend_tag().
2021-12-09 07:16:33 +01:00
Shivam Durgbuns
d75c387f46
Fixed #33334 -- Alphabetized form and model fields in reference docs.
2021-12-02 08:33:26 +01:00
David Smith
9be36f8044
Refs #31026 -- Improved BoundField.label_tag() docs.
2021-10-06 20:30:53 +02:00
Mariusz Felisiak
97237ad3fe
Removed versionadded/changed annotations for 3.2.
2021-09-20 21:23:01 +02:00
David Smith
456466d932
Fixed #31026 -- Switched form rendering to template engine.
...
Thanks Carlton Gibson, Keryn Knight, Mariusz Felisiak, and Nick Pope
for reviews.
Co-authored-by: Johannes Hoppe <info@johanneshoppe.com>
2021-09-20 15:50:18 +02:00
David Smith
5942ab5eb1
Refs #32338 -- Made RadioSelect/CheckboxSelectMultiple render in <div> tags.
...
This improves accessibility for screen reader users.
2021-08-27 06:14:01 +02:00
Andrew Northall
c23aa73626
Fixed #32964 -- Corrected 'setup'/'set up' usage in docs.
2021-08-17 12:18:07 +02:00
David Smith
1024b5e74a
Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate.
2021-07-29 06:24:12 +02:00