Opened 13 years ago
Closed 13 years ago
#16399 closed Cleanup/optimization (fixed)
Code cleanup in django.core.handlers.base.BaseHandler
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In django.core.handlers.base.BaseHandler
, __init__
sets all middleware lists to None
; load_middleware
creates and populates them.
There is a small inconsistency that probably dates back to the introduction of template response middleware: self._template_response_middleware
isn't initialized, while the other lists are. I don't know if it creates a bug — at first sight, this initialization could be skipped entirely — but I believe it should be fixed for the shake of consistency.
Also, load_middleware
's docstring refers to a __call__
method that doesn't exist in the class; I improved that comment.
Attached patch fixes this.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | 16399.diff added |
---|
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In [16506]: