[Django] #34306: Add a list of status codes

3 views
Skip to first unread message

Django

unread,
Feb 1, 2023, 2:59:53 PM2/1/23
to django-...@googlegroups.com
#34306: Add a list of status codes
-------------------------------------+-------------------------------------
Reporter: tetelevm | Owner: nobody
Type: New | Status: new
feature |
Component: Utilities | Version: dev
Severity: Normal | Keywords: status_code
Triage Stage: | status_codes
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The DRF framework has a great thing - constants for status_codes
(https://www.django-rest-framework.org/api-guide/status-codes/).

I think this is a feature lacking in the original Django. The reason - it
improves readability (no _magic numbers_), doesn't require exact
remembering all the codes, and gives a list of default statuses.

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

Django

unread,
Feb 1, 2023, 3:38:34 PM2/1/23
to django-...@googlegroups.com
#34306: Add a list of status codes
-------------------------------------+-------------------------------------
Reporter: tetelevm | Owner: nobody
Type: New feature | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: status_code | Triage Stage:
status_codes | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => wontfix
* component: Utilities => HTTP handling


Comment:

As per 2fcafd169b5fcf4bb6711ca8aa4d59d80225ec7a (#26546), you can use
Python's `http.HTTPStatus`.

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

Reply all
Reply to author
Forward
0 new messages