1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #35871 -- Corrected example on altering the base_fields attribute in forms docs.

This commit is contained in:
antoliny0919 2024-10-29 08:44:37 +09:00 committed by Sarah Boyce
parent 555f2412cb
commit 738e0601d5

View File

@ -406,8 +406,8 @@ process:
.. code-block:: pycon
>>> f.base_fields["subject"].label_suffix = "?"
>>> another_f = CommentForm(auto_id=False)
>>> f.as_div().split("</div>")[0]
>>> another_f = ContactForm(auto_id=False)
>>> another_f.as_div().split("</div>")[0]
'<div><label for="id_subject">Subject?</label><input type="text" name="subject" maxlength="100" required id="id_subject">'
Accessing "clean" data