summaryrefslogtreecommitdiff
path: root/django/core/handlers/base.py
AgeCommit message (Collapse)Author
2026-01-31Refs #34118 -- Removed asgiref coroutine detection shims.Jacob Walls
As Python 3.12 is now the floor, we can drop the shims and use the `inspect` module.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2022-12-20Refs #34118 -- Adopted asgiref coroutine detection shims.Carlton Gibson
Thanks to Mariusz Felisiak for review.
2022-03-17Prevented initialization of unused database connections.Florian Apolloner
2022-02-09Fixed #33495 -- Improved debug logging message about adapting handlers for ↵Aaron Chong
middlewares. It's the wrapped handler that's adapted to the wrapping middleware.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-12-29Fixed #32299 -- Prevented mutating handlers when processing middlewares ↵Mariusz Felisiak
marking as unused in an async context. Thanks Hubert Bielenia for the report.
2020-10-27Fixed #32128 -- Added asgiref 3.3 compatibility.Carlton Gibson
Thread sensitive parameter is True by default from asgiref v3.3.0. Added an explicit thread_sensitive=False to previously implicit uses.
2020-05-28Refs #31040, Refs #31224 -- Prevented cycles in exceptions chain.Mariusz Felisiak
Async exception handling was raising an exception that was creating a cycle in the exception chain (by re-raising an exception in sync_to_async that was already being handled). Thanks Chris Jerdonek for detailed analysis.
2020-05-13Updated logging calls to use arguments instead of string interpolation.François Freitag
2020-03-18Fixed #31224 -- Added support for asynchronous views and middleware.Andrew Godwin
This implements support for asynchronous views, asynchronous tests, asynchronous middleware, and an asynchronous test client.
2020-02-19Refs #31224 -- Added BaseHandler.check_response().Andrew Godwin
2020-02-11Fixed #31240 -- Properly closed FileResponse when wsgi.file_wrapper is used.Florian Apolloner
Thanks to Oskar Persson for the report.
2018-11-20Refs #24829 -- Removed TemplateResponse rendering in BaseHandler.get_response().Tim Graham
Obsolete since 742ea51413b3aab07c6afbfd1d52c1908ffcb510.
2018-11-20Removed BaseHandler.get_exception_response().Tim Graham
Unused since 7d1b69dbe7f72ac04d2513f0468fe2146231b286.
2018-09-26Fixed #29673 -- Reset the URLconf at the end of each request.Matthew Power
Co-authored-by: Ross Thorne <rmwthorne@googlemail.com>
2018-05-27Removed obsolete BaseHandler attributes.Daniel Hepper
Unused since d334f46b7a080fd3eb720141c19b37b10704a352.
2018-05-04Fixed #26688 -- Fixed HTTP request logging inconsistencies.Samir Shah
* Added logging of 500 responses for instantiated responses. * Added logging of all 4xx and 5xx responses.
2017-09-07Removed unneeded __init__() methods.Sergey Fedoseev
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #26601 -- Removed support for old-style middleware using ↵Tim Graham
settings.MIDDLEWARE_CLASSES.
2016-07-25Fixed #26915 -- Fixed regression handling responses returned from view ↵Alex Hill
middleware.
2016-06-17Refs #26601 -- Improved backwards-compatibility of DEP 5 middleware ↵Carl Meyer
exception handling.
2016-05-17Refs #26601 -- Deprecated old-style middleware.Tim Graham
2016-05-17Fixed #26601 -- Improved middleware per DEP 0005.Florian Apolloner
Thanks Tim Graham for polishing the patch, updating the tests, and writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17Refs #26601 -- Refactored BaseHandler to prepare for new-style middleware.Florian Apolloner
2016-04-25Fixed #26052 -- Moved conditional_content_removal() processing to the test ↵Tim Graham
client.
2016-04-20Fixed #26504 -- Avoided logging "Not Found" warnings if a middleware handles ↵Carl Worth
the 404. For example, this avoids a warning in the case of a request that's redirected to a language-prefixed URL by LocaleMiddleware.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-04Fixed W503 flake8 warnings.Tim Graham
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-11-17Fixed #25682 -- Removed bare except clauses.Attila Tovt
2015-10-22Fixed "URLconf" spelling in code comments.Tim Graham
2015-07-03Fixed #24877 -- Added middleware handling of response.render() errors.Sylvain Fankhauser
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-20Fixed #14200 -- Added a fallback if HttpRequest.urlconf is None.Marten Kenbeek
Made BaseHandler fall back to settings.ROOT_URLCONF if HttpRequest.urlconf is set to None, rather than raising ImproperlyConfigured.
2015-06-17Fixed #24829 -- Allowed use of TemplateResponse in view error handlers.ana-balica
2015-05-11Fixed #24733 -- Passed the triggering exception to 40x error handlersClaude Paroz
Thanks Tim Graham for the review.
2015-05-05Extended variable name in handlers/base.pyClaude Paroz
Refs #24733.
2015-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-27Fixed #14664 -- Logged a warning if MiddlewareNotUsed is raised in DEBUG mode.Berker Peksag
2014-11-22Fixed #23887 -- Returned Bad Request for multipart parsing failsClaude Paroz
Thanks Antti Häyrynen and Tim Graham for the report, and Aymeric Augustin for the review.
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-06-24Fixed #21668 -- Return detailed error page when SuspiciousOperation is ↵Anubhav Joshi
raised and DEBUG=True Thanks GDorn and gox21 for report. Thanks Tim Graham for idea and review.
2014-06-23Refactored common code in handlers/base.py and urlresolvers.pyAnubhav Joshi
2014-06-11Fixed #22680 -- I/O operation on closed file.Florian Apolloner
This patch is two-fold; first it ensure that Django does close everything in request.FILES at the end of the request and secondly the storage system should no longer close any files during save, it's up to the caller to handle that -- or let Django close the files at the end of the request.