Opened 22 months ago
Closed 22 months ago
#34306 closed New feature (wontfix)
Add a list of status codes
Reported by: | Tetelev Mikhail | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | status_code status_codes |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (1)
comment:1 by , 22 months ago
Component: | Utilities → HTTP handling |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
As per 2fcafd169b5fcf4bb6711ca8aa4d59d80225ec7a (#26546), you can use Python's
http.HTTPStatus
.