Răsfoiți Sursa

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

antoliny0919 4 luni în urmă
părinte
comite
738e0601d5
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      docs/ref/forms/api.txt

+ 2 - 2
docs/ref/forms/api.txt

@@ -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