#35871: Example changes that show the impact of alter the base_fields attribute.
--------------------------------+-----------------------------------------
     Reporter:  Antoliny        |                     Type:  Uncategorized
       Status:  new             |                Component:  Documentation
      Version:  5.0             |                 Severity:  Normal
     Keywords:  Forms Document  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+-----------------------------------------
 There is an example of the impact of changing the attribute of base_fields
 in the
 [https://docs.djangoproject.com/en/5.1/ref/forms/api/#django.forms.Form.fields
 forms api document].

 According to the above document, I think we need to show the impact on
 subsequent ContactForm when we change the base_fields attribute as an
 example of ContactForm.
 {{{
 >>> f.base_fields["subject"].label_suffix = "?"
 >>> 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">'
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35871>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070192d5819dbb-061926c9-b412-4dae-b398-c55261dc6631-000000%40eu-central-1.amazonses.com.

Reply via email to