0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

99 Commits

Author SHA1 Message Date
David Smith
292f1ea90f 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>`.
2023-11-16 12:23:42 +01:00
Mariusz Felisiak
46df3ab244
Fixed typo in docs/topics/forms/index.txt. 2023-10-30 05:16:40 +01:00
Carlton Gibson
07b7a3ab75
Fixed formatting typo in docs/topics/forms/index.txt. 2023-07-22 19:48:55 +02: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
David Smith
cad376f844 Fixed #34077 -- Added form field rendering. 2023-03-24 10:16:30 +01:00
django-bot
14459f80ee Fixed #34140 -- Reformatted code blocks in docs with blacken-docs. 2023-03-01 13:03:56 +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
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
490cccbe7e Removed versionadded/changed annotations for 4.1. 2023-01-17 11:49:15 +01:00
Mariusz Felisiak
ac90529cc5 Fixed docs build with sphinxcontrib-spelling 7.5.0+.
sphinxcontrib-spelling 7.5.0+ includes captions of figures in the set
of nodes for which the text is checked.
2022-05-31 11:17:01 +02:00
Carlton Gibson
ca1c3151c3 Removed versionadded/changed annotations for 4.0. 2022-05-17 14:22:06 +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
David
ce586ed693 Removed hyphen from pre-/re- prefixes.
"prepopulate", "preload", and "preprocessing" are already in the
spelling_wordlist.

This also removes hyphen from double "e" combinations with "pre" and
"re", e.g. preexisting, preempt, reestablish, or reenter.

See also:
- https://ahdictionary.com/word/search.html?q=rerun
- https://ahdictionary.com/word/search.html?q=recreate
- https://ahdictionary.com/word/search.html?q=predetermined
- https://ahdictionary.com/word/search.html?q=reuse
- https://ahdictionary.com/word/search.html?q=reopening
2022-04-28 10:44:14 +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
David
c8459708a7 Refs #32339 -- Added use_fieldset to Widget. 2022-03-30 16:28:14 +02:00
David Smith
75c1127eef
Alphabetized field attributes in form topic docs. 2022-01-12 08:07:21 +01: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
1024b5e74a Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. 2021-07-29 06:24:12 +02:00
Adam Johnson
d17b380653 Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments. 2020-05-04 12:10:47 +02:00
Mariusz Felisiak
30ca66eadd
Added missing backticks in various docs. 2020-03-06 11:52:49 +01:00
Tobias Kunze
4a954cfd11 Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question.
Rather, I went through all of the occurrences of the words listed
below, and judged if they a) suggested the reader had some kind of
knowledge/experience, and b) if they added anything of value (including
tone of voice, etc). I left most of the words alone. I looked at the
following words:

- simply/simple
- easy/easier/easiest
- obvious
- just
- merely
- straightforward
- ridiculous

Thanks to Carlton Gibson for guidance on how to approach this issue, and
to Tim Bell for providing the idea. But the enormous lion's share of
thanks go to Adam Johnson for his patient and helpful review.
2019-09-06 13:27:46 +02:00
François Freitag
9b15ff08ba Used auto-numbered lists in documentation. 2018-11-15 13:54:28 -05:00
Curtis Maloney
c49ea6f591 Refs #20910 -- Replaced snippet directive with code-block. 2018-09-10 13:00:34 -04:00
Mariusz Felisiak
35319bf12c
Alphabetized imports in various docs.
Follow-up of d97cce3409 and 7d3fe36c62.
2018-05-12 19:37:42 +02:00
Tim Graham
ff61a25081
Fixed #29107 -- Doc'd that ModelForm doesn't actually inherit from Form. 2018-02-08 10:10:28 -05:00
Jon Dufresne
ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Jon Dufresne
ec6121693f Fixed #22383 -- Added support for HTML5 required attribute on required form fields. 2016-04-21 19:16:38 -04:00
Jon Dufresne
38ddd4ab55 Fixed incorrect rendered widget in forms example. 2016-04-20 21:07:59 -04:00
Elif T. Kus
bca9faae95 Fixed #26020 -- Normalized header stylings in docs. 2016-01-22 12:12:17 -05:00
Agnieszka Lasyk
1f8dad6915 Fixed #25755 -- Unified spelling of "website". 2015-11-16 06:44:14 -05:00
John Moses
ac09d22f79 Fixed #25481 -- Added field.help_text to "Looping over a form's fields" docs. 2015-10-02 12:52:14 -04:00
Tim Graham
54848a96dd Removed versionadded/changed annotations for 1.8. 2015-09-23 19:31:11 -04:00
Moritz Sichert
2f53d342f1 Fixed #12856 -- Documented BoundField API. 2015-09-21 08:42:14 -04:00
I am Clinton
ec74dba2ab Light edits to docs/topics/forms/index.txt 2015-05-12 09:16:13 -04:00
Patrik Lundin
f9c212d09a Specified file names for example code in docs/topics/forms/index.txt 2015-04-07 09:35:22 -04:00
Claude Paroz
e0080cf577 Fixed #24083 -- Corrected is_bound nature in forms topic docs
Thanks ajenhl Trac user for the report.
2015-01-06 08:56:53 +01:00
Markus Holtermann
c7786550c4 Fixed display of lists after website redesign
Thanks Brian Jacobel for the report. refs django/djangoproject.com#197
2014-12-17 08:24:00 -05:00
nmundar
48515ee1f7 Fixed #23690 - fixed examples of manual rendering of form fields
Documentation for rendering form fields manually is now updated to use fields id_for_label instead of hardcoded values with additional mention of label_tag for alternative generation of complete label tag.
2014-11-15 13:29:16 +01:00
Tim Graham
40ba6f21bb Fixed spelling errors in docs. 2014-11-11 16:41:09 +01:00
Berker Peksag
5c517ec218 Fixed versionchanged indentation in docs/. 2014-11-03 21:40:26 -05:00
Thomas Chaumeny
d3db878e4b Moved CSRF docs out of contrib. 2014-11-03 07:47:39 -05:00
Claude Paroz
5066fda34d Replaced input by textarea in forms docs 2014-09-25 15:09:12 +02:00
Erik Romijn
cbdda28208 Fixed #23075 -- Added documentation on novalidate attribute and made it default for admin
Thanks to sehmaschine for the report and to Tim Graham for the review.
2014-08-26 14:20:31 +02:00
areski
9d6551204e Removed unnecessary code-block directives. 2014-08-19 16:44:25 -04:00
Matt Deacalion Stevens
ec85df2fa5 Fixed and enhanced new HTML form docs. 2014-06-26 13:57:19 -04:00
Ramiro Morales
77c0a904cb Fixed typo in revamped forms intro doc. 2014-06-25 12:15:20 -03:00
Daniele Procida
cd20b5d186 Fixed #22796 -- Added a more basic explanations of forms.
Thanks bmispelon, kezabelle, jorgecarleitao, and timgraham for reviews.
2014-06-24 14:55:22 -04:00
Nick Presta
11f0899bbe Fixed #11776 -- Added CSS class for non-field/top of form errors.
Thanks Daniel Pope for the suggestion.
2014-06-02 15:22:15 -04:00
Marti Raudsepp
11d453bcad Various documentation typo/spelling fixes
Errors detected by Topy (https://github.com/intgr/topy), all changes
verified by hand.
2014-04-23 02:31:49 +03:00