[Django] #35871: Example changes that show the impact of alter the base_fields attribute.

5 views
Skip to first unread message

Django

unread,
Oct 28, 2024, 7:41:39 PM10/28/24
to django-...@googlegroups.com
#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.

Django

unread,
Oct 28, 2024, 7:41:52 PM10/28/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
--------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Uncategorized | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
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
--------------------------------+--------------------------------------
Changes (by Antoliny):

* owner: (none) => Antoliny
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:1>

Django

unread,
Oct 28, 2024, 7:51:23 PM10/28/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
--------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Uncategorized | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Forms Document | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Antoliny):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:2>

Django

unread,
Oct 28, 2024, 7:52:10 PM10/28/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
--------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Uncategorized | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Forms Document | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Comment (by Antoliny):

[https://github.com/django/django/pull/18736 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:3>

Django

unread,
Oct 29, 2024, 2:49:13 AM10/29/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Forms Document | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization

--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:4>

Django

unread,
Oct 29, 2024, 2:55:41 AM10/29/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Forms Document | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:5>

Django

unread,
Oct 29, 2024, 3:39:19 AM10/29/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution: fixed
Keywords: Forms Document | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"738e0601d597d4b6bee0000f645994495af984d8" 738e0601]:
{{{#!CommitTicketReference repository=""
revision="738e0601d597d4b6bee0000f645994495af984d8"
Fixed #35871 -- Corrected example on altering the base_fields attribute in
forms docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:6>

Django

unread,
Oct 29, 2024, 3:41:39 AM10/29/24
to django-...@googlegroups.com
#35871: Example changes that show the impact of alter the base_fields attribute.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution: fixed
Keywords: Forms Document | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"a0ea554d24406011474af6be6183807c94d20896" a0ea554d]:
{{{#!CommitTicketReference repository=""
revision="a0ea554d24406011474af6be6183807c94d20896"
[5.1.x] Fixed #35871 -- Corrected example on altering the base_fields
attribute in forms docs.

Backport of 738e0601d597d4b6bee0000f645994495af984d8 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35871#comment:7>
Reply all
Reply to author
Forward
0 new messages