[Django] #32905: Add `nonform` CSS class for non form errors in FormSets

27 views
Skip to first unread message

Django

unread,
Jul 5, 2021, 2:31:51 PM7/5/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
------------------------------------------------+--------------------------
Reporter: Ties Jan Hefting | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+--------------------------
Forms add the `nonfield` CSS class for non field errors in ErrorClass
instances. This is documented in a section on
[https://docs.djangoproject.com/en/dev/topics/forms/#rendering-form-error-
messages rendering form error messages]. Similarly, in FormSets I'd expect
to see the `nonform` CSS class added for non form errors. This would allow
a custom ErrorClass to make a distinction in form field errors, non field
errors (forms) and non form errors (FormSets) when rendering error
messages. Therefore I'd suggest to add this `nonform` CSS class and
document it for developers to use.

--
Ticket URL: <https://code.djangoproject.com/ticket/32905>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 5, 2021, 2:32:13 PM7/5/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
Type: | Hefting

Cleanup/optimization | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ties Jan Hefting):

* owner: nobody => Ties Jan Hefting


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

Django

unread,
Jul 6, 2021, 12:31:14 AM7/6/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* type: Cleanup/optimization => New feature
* easy: 1 => 0
* stage: Unreviewed => Accepted


Comment:

Seems reasonable (similar to #11776).

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

Django

unread,
Jul 7, 2021, 3:52:27 PM7/7/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: assigned
Component: Forms | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ties Jan Hefting):

* has_patch: 0 => 1


Old description:

> Forms add the `nonfield` CSS class for non field errors in ErrorClass
> instances. This is documented in a section on
> [https://docs.djangoproject.com/en/dev/topics/forms/#rendering-form-

> error-messages rendering form error messages]. Similarly, in FormSets I'd


> expect to see the `nonform` CSS class added for non form errors. This
> would allow a custom ErrorClass to make a distinction in form field
> errors, non field errors (forms) and non form errors (FormSets) when
> rendering error messages. Therefore I'd suggest to add this `nonform` CSS
> class and document it for developers to use.

New description:

Forms add the `nonfield` CSS class for non field errors in ErrorList


instances. This is documented in a section on
[https://docs.djangoproject.com/en/dev/topics/forms/#rendering-form-error-
messages rendering form error messages]. Similarly, in FormSets I'd expect
to see the `nonform` CSS class added for non form errors. This would allow

a custom ErrorList to make a distinction in form field errors, non field


errors (forms) and non form errors (FormSets) when rendering error
messages. Therefore I'd suggest to add this `nonform` CSS class and
document it for developers to use.

--

Comment:

[https://github.com/django/django/pull/14608 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32905#comment:3>

Django

unread,
Jul 13, 2021, 5:18:51 AM7/13/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: assigned
Component: Forms | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


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

Django

unread,
Jul 14, 2021, 3:49:07 PM7/14/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: assigned
Component: Forms | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ties Jan Hefting):

* needs_better_patch: 1 => 0


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

Django

unread,
Jul 15, 2021, 1:02:10 AM7/15/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | 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 Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32905#comment:6>

Django

unread,
Jul 15, 2021, 1:42:58 AM7/15/21
to django-...@googlegroups.com
#32905: Add `nonform` CSS class for non form errors in FormSets
-------------------------------------+-------------------------------------
Reporter: Ties Jan Hefting | Owner: Ties Jan
| Hefting
Type: New feature | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | 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 Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"84400d2e9db7c51fee4e9bb04c028f665b8e7624" 84400d2e]:
{{{
#!CommitTicketReference repository=""
revision="84400d2e9db7c51fee4e9bb04c028f665b8e7624"
Fixed #32905 -- Added CSS class for non-form errors of formsets.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32905#comment:7>

Reply all
Reply to author
Forward
0 new messages