[Django] #32214: Add django.core.exceptions.NON_FIELD_ERRORS key to the settings

10 views
Skip to first unread message

Django

unread,
Nov 20, 2020, 8:42:46 AM11/20/20
to django-...@googlegroups.com
#32214: Add django.core.exceptions.NON_FIELD_ERRORS key to the settings
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
omerfarukabaci |
Type: New | Status: new
feature |
Component: Core | Version: 3.1
(Other) | Keywords: non_field_errors,
Severity: Normal | settings
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
It would be a good addition to be able to change
`django.core.exceptions.NON_FIELD_ERRORS` key in settings. It is being
used when a `django.core.exceptions.ValidationError` is raised without
specifying a key. In `Django Rest Framework` it is editable via settings
and it would be good to have a consistent key for non field errors between
`Django` and `Django Rest Framework` without needing to patch
`django.core.exceptions.NON_FIELD_ERRORS`. Thank you in advance!

[1 https://www.django-rest-framework.org/api-
guide/settings/#non_field_errors_key]

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

Django

unread,
Nov 20, 2020, 8:43:36 AM11/20/20
to django-...@googlegroups.com
#32214: Add django.core.exceptions.NON_FIELD_ERRORS key to the settings
-------------------------------------+-------------------------------------
Reporter: omerfarukabaci | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 3.1
Severity: Normal | Resolution:
Keywords: non_field_errors, | Triage Stage:
settings | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by omerfarukabaci:

Old description:

> It would be a good addition to be able to change
> `django.core.exceptions.NON_FIELD_ERRORS` key in settings. It is being
> used when a `django.core.exceptions.ValidationError` is raised without
> specifying a key. In `Django Rest Framework` it is editable via settings
> and it would be good to have a consistent key for non field errors
> between `Django` and `Django Rest Framework` without needing to patch
> `django.core.exceptions.NON_FIELD_ERRORS`. Thank you in advance!
>
> [1 https://www.django-rest-framework.org/api-
> guide/settings/#non_field_errors_key]

New description:

It would be a good addition to be able to change
`django.core.exceptions.NON_FIELD_ERRORS` key in settings. It is being
used when a `django.core.exceptions.ValidationError` is raised without
specifying a key. In `Django Rest Framework` it is editable via settings
and it would be good to have a consistent key for non field errors between
`Django` and `Django Rest Framework` without needing to patch
`django.core.exceptions.NON_FIELD_ERRORS`. Thank you in advance!

ref: https://www.django-rest-framework.org/api-
guide/settings/#non_field_errors_key

--

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

Django

unread,
Nov 21, 2020, 12:42:26 AM11/21/20
to django-...@googlegroups.com
#32214: Add django.core.exceptions.NON_FIELD_ERRORS key to the settings
-------------------------------------+-------------------------------------
Reporter: Ömer Faruk Abacı | Owner: nobody
Type: New feature | Status: closed

Component: Core (Other) | Version: 3.1
Severity: Normal | Resolution: wontfix

Keywords: non_field_errors, | Triage Stage:
settings | Unreviewed
Has patch: 0 | Needs documentation: 0

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

* status: new => closed
* resolution: => wontfix


Comment:

It seems niche and adding a new setting is always a bit controversial. You
can start a discussion on DevelopersMailingList if you don't agree. We
need to reach a strong consensus on ML before moving it forward. Please
remember to describe your use case, consistency with DRF is not a reason
for adding a new setting to Django.

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

Reply all
Reply to author
Forward
0 new messages