summaryrefslogtreecommitdiff
path: root/django/template/response.py
AgeCommit message (Collapse)Author
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2023-04-12Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling HttpResponse and ↵Mariusz Felisiak
subclasses." This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db. Thanks Márton Salomváry for the report.
2022-06-20Fixed #32969 -- Fixed pickling HttpResponse and subclasses.Anv3sh
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2020-10-07Fixed #32002 -- Added headers parameter to HttpResponse and subclasses.Tom Carrick
2019-04-24Removed unnecessary assignments in various code.Jon Dufresne
2017-02-17Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2016-11-24Fixed #27517 -- Fixed charset param in SimpleTemplateResponse.__init__().Kosei Kitahara
2016-11-23Cleaned up some __getstate__() docstrings.Tim Graham
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2015-09-23Made template response APIs enforce the use of dict and backend-specific ↵Tim Graham
template objects. Per deprecation timeline; refs 79deb6a0716e554cac5308e86f5754f19ad436dc.
2015-09-23Removed current_app argument to render() and TemplateResponse().Tim Graham
Per deprecation timeline.
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-05-06Moved engine-related exceptions to django.template.exceptions.Preston Timmons
With the introduction of multiple template engines these exceptions are no longer DTL-specific. It makes more sense for them to be moved out of DTL-related modules.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24168 -- Allowed selecting a template engine in a few APIs.Aymeric Augustin
Specifically in rendering shortcuts, template responses, and class-based views that return template responses. Also added a test for render_to_response(status=...) which was missing from fdbfc980. Thanks Tim and Carl for the review.
2015-01-12Accounted for multiple template engines in template responses.Aymeric Augustin
2015-01-12Deprecated passing a Context to a generic Template.render.Aymeric Augustin
A deprecation path is required because the return type of django.template.loader.get_template changed during the multiple template engines refactor. test_csrf_token_in_404 was incorrect: it tested the case when the hardcoded template was rendered, and that template doesn't depend on the CSRF token. This commit makes it test the case when a custom template is rendered.
2014-12-28Deprecated current_app in TemplateResponse and render(_to_response).Aymeric Augustin
2014-11-12Fixed #23730 -- Moved support for SimpleCookie HIGHEST_PROTOCOL pickling to ↵Tim Graham
http.cookie. This fix is necessary for Python 3.5 compatibility (refs #23763). Thanks Berker Peksag for review.
2014-11-10Fixed #23789 -- TemplateResponse handles context differently from renderLuke Plant
2014-08-19Fixed #10190 -- Made HttpResponse charset customizable.Unai Zalakain
Thanks to Simon Charette, Aymeric Augustin, and Tim Graham for reviews and contributions.
2013-09-22Removed a few trailing backslashes.Aymeric Augustin
We have always been at war with trailing backslashes.
2013-06-28Removed 'mimetype' arguments from a few places, as per deprecation TL.Ramiro Morales
This includes HttpResponse and co. __init__() methods, django.shortcuts.render_to_response() and the index(), sitemap() sitemap app views.
2012-11-09Fixed #19262 -- Support cookie pickling in SimpleTemplateResponseSean Breant
Refs #15863.
2012-08-22Used the decorator syntax for properties in django.httpClaude Paroz
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-06-30Fixed #16519 -- Deprecated mimetype kwarg of HttpResponse __init__Claude Paroz
This keyword was already deprecated in the code (supported for backwards compatibility only), but never formally deprecated. Thanks Paul McMillan for the report and yasar11732 for the initial patch.
2011-09-30Fixed #16935 - misleading message if AttributeError escapes during ↵Luke Plant
SimpleTemplateResponse.render Thanks to isagalaev for the report. As discussed on django-devs, this reverts some of the changes in [16568] i.e. the addition of `SimpleTemplateResponse.__getattr__`, because this makes it much harder to debug the common case of an AttributeError somewhere during the rendering of a SimpleTemplateResponse. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-15Fixed #16848 - Adjusted SimpleTemplateResponse.__init__ to be less brittle.Carl Meyer
Could have reverted r16830 instead, but HttpResponse shouldn't have to dance around and do non-obvious things to keep TemplateResponse happy, TemplateResponse should be robust against the possibility that HttpResponse.__init__ might set self.content. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29Fixed #16326 -- Fixed re-pickling of unpickled TemplateResponse instances. ↵Jannis Leidel
Thanks, natrius and lrekucki. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24Fixed #16004 - csrf_protect does not send cookie if view returns ↵Luke Plant
TemplateResponse The root bug was in decorator_from_middleware, and the fix also corrects bugs with gzip_page and other decorators. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24Fixed #15012 -- Added post-rendering callbacks to TemplateResponse so that ↵Russell Keith-Magee
decorators (in particular, the cache decorator) can defer processing until after rendering has occurred. Thanks to Joshua Ginsberg for the draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-05Fixed #15010 -- Added current_app parameter to close gap between ↵Jannis Leidel
TemplateResponse and render method. Thanks, acdha. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-07Fixed #12815 -- Added TemplateResponse, a lazy-evaluated Response class. ↵Russell Keith-Magee
Thanks to Simon Willison for the original idea, and to Mikhail Korobov and Ivan Sagalaev for their assistance, including the draft patch from Mikhail. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14850 bcc190cf-cafb-0310-a4f2-bffc1f526a37