Opened 7 years ago

Closed 7 years ago

#27748 closed Cleanup/optimization (fixed)

Use callables instead of strings as default error handlers (handler404, etc.)

Reported by: Dmitry Gladkov Owned by: nobody
Component: Core (URLs) Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Related PR: https://github.com/django/django/pull/7858

Django favors direct imports to import strings where possible, however right now default error handlers are dotted module path strings, e.g. 'django.views.defaults.bad_request'.

Change History (2)

comment:1 by Tim Graham, 7 years ago

Has patch: set
Summary: Use callables as default status code handlersUse callables instead of strings as default error handlers (handler404, etc.)
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: newclosed

In b09faa49:

Fixed #27748 -- Switched HTTP error handlers to reference callables instead of strings.

Note: See TracTickets for help on using tickets.
Back to Top