Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/template/context.py
Commit message (Collapse)AuthorAgeFilesLines
* Removed current_app argument to render() and ↵Tim Graham2015-09-241-33/+2
| | | | | | TemplateResponse(). Per deprecation timeline.
* Fixed #24765 -- Allowed template context updates to ↵Buddy Lindsey, Jr2015-09-111-1/+9
| | | | flatten a Context.
* Fixed #24127 -- Changed the default current_app to the ↵Marten Kenbeek2015-07-271-0/+4
| | | | | | | current namespace. Changed the url template tag to use request.resolver_match.namespace as a default for the current_app argument if request.current_app is not set.
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-3/+3
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #24847 -- Prevented items set on a RequestContext ↵Paweł Marczewski2015-05-271-1/+7
| | | | from being lost.
* Fixed #24603 -- Allowed Context.update() to be used as a ↵Tommy Beadle2015-04-141-2/+1
| | | | context manager.
* Fixed #18773 -- Added logging for template variable ↵Caroline Simpson2015-03-281-0/+1
| | | | | | | | resolving Added a django.template logger without a default handler. Added logging if there is an exception while resolving variables in a template.
* Fixed #24493 -- Added BaseContext.setdefault()Preston Timmons2015-03-161-0/+7
|
* Removed a non-obvious side-effect of assigning ↵Aymeric Augustin2015-02-201-24/+33
| | | | | | Context.template. Explicit is better than implicit.
* Set context.template instead of context.engine while ↵Aymeric Augustin2015-02-191-13/+19
| | | | | | | | rendering. This opens more possibilities, like accessing context.template.origin. It also follows the chain of objects instead of following a shortcut.
* Split DTL context creation into its own function.Aymeric Augustin2015-02-101-0/+16
| | | | | | | This reduces the length of rope RequestContext gives users to hang themselves with. Thanks Alex Hill for the report and Tim Graham for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-2/+1
|
* Fixed #24273 -- Allowed copying RequestContext more than ↵Aymeric Augustin2015-02-051-1/+2
| | | | | | once. Thanks Collin Anderson for the report.
* Deprecated TEMPLATE_CONTEXT_PROCESSORS.Aymeric Augustin2014-12-281-1/+1
|
* Deprecated current_app in TemplateResponse and ↵Aymeric Augustin2014-12-281-7/+25
| | | | render(_to_response).
* Simplified implementation of ↵Aymeric Augustin2014-12-281-2/+8
| | | | | | django.shortcuts.render(_to_response). *args, **kwargs brought more confusion than concision.
* Moved context_processors from django.core to ↵Aymeric Augustin2014-12-281-1/+1
| | | | django.template.
* Encapsulated TEMPLATE_CONTEXT_PROCESSORS in Engine.Aymeric Augustin2014-11-231-18/+30
| | | | | | Since RequestContext doesn't know its Engine until it's passed to Template.render() -- and cannot without breaking a widely used public API -- an elaborate hack is required to apply context processors.
* Added to each Context a reference to the Engine.Aymeric Augustin2014-11-231-3/+4
| | | | It's only available during the rendering.
* Simplified caching of template context processors.Aymeric Augustin2014-11-191-16/+7
|
* Fixed #23585 - Corrected internal comment.Grzegorz Slusarek2014-11-151-3/+1
| | | | | Removed misleading comment and provide correct one, explaining idea behind hardcoded CSRF template context processor.
* Made the new template.Context.flatten() method a public API.Marek Wywiał2014-02-161-7/+10
| | | | | | That method was introduced in 9db4271bd11ac23a5a5652bbcdf8fb6d4b997651. Refs #21765.
* Fixed bad comparison logic introduced in ↵Baptiste Mispelon2014-02-151-1/+9
| | | | | | | | | d97bf2e9c8971764690caaf81a0914bc368d6b02. Refs #21765. Thanks to kezabelle for the quick report and to onjin for providing the patch.
* Fixed #21765 -- Added support for comparing Context ↵Marek Wywiał2014-02-151-0/+10
| | | | instances
* Fixed #21674 -- Deprecated the import_by_path() function ↵Berker Peksag2014-02-081-2/+2
| | | | | | in favor of import_string(). Thanks Aymeric Augustin for the suggestion and review.
* Small flake8 fixes -- number of blank lines between top ↵Alex Gaynor2013-12-201-0/+1
| | | | level definitions
* Fixed #21639 -- Implemented RenderContext.__getitem__Alex Hill2013-12-201-4/+3
| | | | It's now consistent with RenderContext.get.
* Fixed the remaining E302 violations int eh django packageAlex Gaynor2013-11-031-0/+2
|
* More attacking E302 violatorsAlex Gaynor2013-11-021-0/+1
|
* Fixed assorted flake8 errors.Tim Graham2013-10-111-1/+1
|
* Fixed #7116 -- Optimize RequestContext constructionCurtis Maloney2013-08-291-1/+3
|
* Allowed Context.push to behave as a context mananger.Curtis Maloney2013-07-171-4/+19
| | | | Thanks Loic Bistuer for the review.
* Fixed #17061 -- Factored out importing object from a ↵Claude Paroz2013-02-041-12/+2
| | | | | | dotted path Thanks Carl Meyer for the report.
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Fixed #18103 -- Regression introduced in r17895.Aymeric Augustin2012-04-111-2/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@17896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17229 -- Allow 'True', 'False' and 'None' to ↵Aymeric Augustin2012-04-101-1/+4
| | | | | | resolve to the corresponding Python objects in templates. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added support for time zones. Thanks Luke Plant for the ↵Aymeric Augustin2011-11-181-4/+8
| | | | | | | | | | | review. Fixed #2626. For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16225 -- Removed unused imports. Many thanks to ↵Jannis Leidel2011-07-131-1/+0
| | | | | | Aymeric Augustin for the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #15721 (again) via a minor tweak to avoid ↵Chris Beaven2011-04-191-1/+1
| | | | | | unexpected behaviour of copy() which caused a range of test failures git-svn-id: http://code.djangoproject.com/svn/django/trunk@16044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #15721 -- Make {% include %} and RequestContext ↵Chris Beaven2011-04-171-20/+16
| | | | | | work together again. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15572 - include with "only" option discards ↵Luke Plant2011-03-101-0/+8
| | | | | | | | context properties (such as autoescape) Thanks to dfoerster for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15368 - test failures due to regression with ↵Luke Plant2011-02-271-15/+9
| | | | | | | | RequestContext Thanks to cyberdelia for the reports on this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fix broken tests due to changes in r15591 by updating ↵Chris Beaven2011-02-211-0/+25
| | | | | | the test store_rendered_templates signal handler. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #3529 -- more explicit documentation about ↵Chris Beaven2010-11-241-1/+1
| | | | | | Context.update. Thanks for the patch, ggetzie. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14181 -- Added a template tag and filters to ↵Russell Keith-Magee2010-10-291-3/+4
| | | | | | allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6262 -- Added a cached template loader, and ↵Russell Keith-Magee2009-12-141-14/+48
| | | | | | modified existing template loaders and tag to be cacheable. Thanks to Mike Malone for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Moved contrib.csrf.* to core code.Luke Plant2009-10-271-1/+1
| | | | | | | | | | | | There is stub code for backwards compatiblity with Django 1.1 imports. The documentation has been updated, but has been left in docs/contrib/csrf.txt for now, in order to avoid dead links to documentation on the website. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9977 - CsrfMiddleware gets template tag added, ↵Luke Plant2009-10-271-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | session dependency removed, and turned on by default. This is a large change to CSRF protection for Django. It includes: * removing the dependency on the session framework. * deprecating CsrfResponseMiddleware, and replacing with a core template tag. * turning on CSRF protection by default by adding CsrfViewMiddleware to the default value of MIDDLEWARE_CLASSES. * protecting all contrib apps (whatever is in settings.py) using a decorator. For existing users of the CSRF functionality, it should be a seamless update, but please note that it includes DEPRECATION of features in Django 1.1, and there are upgrade steps which are detailed in the docs. Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work on the patch, and to lots of other people including Simon Willison and Russell Keith-Magee who refined the ideas. Details of the rationale for these changes is found here: http://code.djangoproject.com/wiki/CsrfProtection As of this commit, the CSRF code is mainly in 'contrib'. The code will be moved to core in a separate commit, to make the changeset as readable as possible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10061 -- Added namespacing for named URLs - most ↵Russell Keith-Magee2009-07-161-3/+4
| | | | | | | | | | | | importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch. This change is backwards incompatible for anyone that is using the named URLs introduced in [9739]. Any usage of the old admin_XXX names need to be modified to use the new namespaced format; in many cases this will be as simple as a search & replace for "admin_" -> "admin:". See the docs for more details on the new URL names, and the namespace resolution strategy. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10079 -- Moved settings import inside the ↵Gary Wilson Jr2009-03-301-1/+1
| | | | | | function that uses it so that the module can be imported without needing settings, thanks kcarnold and mcroydon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10209 bcc190cf-cafb-0310-a4f2-bffc1f526a37