summaryrefslogtreecommitdiff
path: root/tests/template_tests/tests.py
AgeCommit message (Collapse)Author
2015-02-24[1.8.x] Cleaned up template directory handling in template tests.Preston Timmons
Backport of 8e129b42ad9c9adca599228ae2ad68271fa46d44 from master
2015-02-24[1.8.x] Combined TemplateTests and TemplateRegressionTests.Preston Timmons
Backport of 32c108a221c54a4f680afe32175d70b5d2e92593 from master
2015-02-24[1.8.x] Moved test_token_smart_split into ParserTests.Preston Timmons
Backport of 25a0b5cdcd5e70a6563116639a477b915ee5784e from master
2015-02-24[1.8.x] Moved ifchanged tests into syntax_tests/test_if_changed.py.Preston Timmons
Backport of 3d8fee605184d8ffa47a32546298b52b52d7a087 from master
2015-02-24[1.8.x] Moved cache tests into syntax_tests/test_cache.py.Preston Timmons
Backport of f6d087b628a61a7b036cc468328497082031dc8e from master
2015-02-24[1.8.x] Moved RequestContextTests into test_context.Preston Timmons
Backport of 250a3d199310a954a95fb1ffa4915f0e51ba1767 from master
2015-02-24[1.8.x] Moved TemplateTagLoading cases into test_custom.Preston Timmons
Backport of ff67ce5076c1f4d3dc32fd755a1b65d3310c6cb1 from master
2015-02-24[1.8.x] Moved include tests into syntax_tests/test_include.py.Preston Timmons
Backport of 06ffc764a9b2d2521e6a574d279b66ad411cc65c from master
2015-02-24[1.8.x] Moved ssi tests into syntax_tests/test_ssi.py.Preston Timmons
Backport of 441a47e1efd46001ca454b80e0d5f8c5ea4e235b from master
2015-02-24[1.8.x] Cleaned up template loader tests.Tim Graham
Backport of 1827aa902481cd80d2fb154e7b073f139936d5fc from master
2015-02-19[1.8.x] Set context.template instead of context.engine while rendering.Aymeric Augustin
This opens more possibilities, like accessing context.template.origin. It also follows the chain of objects instead of following a shortcut. Backport of 1bfcc95 from master
2015-02-15[1.8.x] Deprecated TEMPLATE_DEBUG setting.Aymeric Augustin
Backport of 15b711b from master.
2015-02-14[1.8.x] Fixed #24338 -- Accepted Template wrapper in {% extends %}.Aymeric Augustin
Explicitly checking for django.template.Template subclasses is preferrable to duck-typing because both the django.template.Template and django.template.backends.django.Template have a render() method. Thanks spectras for the report. Backport of 47ee7b48 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
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.
2015-01-05Fixed #24022 -- Deprecated the ssi tag.Preston Timmons
2014-12-28Deprecated TEMPLATE_CONTEXT_PROCESSORS.Aymeric Augustin
2014-12-28Deprecated TEMPLATE_DIRS.Aymeric Augustin
2014-12-28Deprecated TEMPLATE_LOADERS.Aymeric Augustin
2014-12-28Deprecated TEMPLATE_STRING_IF_INVALID.Aymeric Augustin
2014-12-28Deprecated ALLOWED_INCLUDE_ROOTS.Aymeric Augustin
2014-12-28Supported multiple template engines in get_template and select_template.Aymeric Augustin
This commit changes the return type of these two functions. Instead of returning a django.template.Template they return a backend-specific Template class that must implement render(self, context).
2014-12-28Cleaned up the django.template namespace.Aymeric Augustin
Since this package is going to hold both the implementation of the Django Template Language and the infrastructure for Multiple Template Engines, it should be untied from the DTL as much as possible within our backwards-compatibility policy. Only public APIs (i.e. APIs mentioned in the documentation) were left.
2014-12-06Fixed #23958 -- Rewrote filter tests as unit tests.Preston Timmons
2014-12-03Converted recently refactored templates tests to SimpleTestCase.Ramiro Morales
These test methods don't need DB setup/teardown. Refs #23768 and b872134b.
2014-12-03Removed redundant numbered parameters from str.format().Berker Peksag
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-02Fixed #23768 -- Rewrote template tests as unit tests.Preston Timmons
2014-11-25Fixed #23914 -- Improved {% now %} to allow storing its result in the context.Baptiste Mispelon
Thanks to Tim for the review.
2014-11-25Fixed #23890 -- Silenced numpy DeprecationWarnings in template tests.Tim Graham
2014-11-23Encapsulated TEMPLATE_STRING_IF_INVALID in Engine.Aymeric Augustin
2014-11-23Moved template loaders management in Engine.Aymeric Augustin
Passed the engine instance to loaders. This is a prerequisite for looking up configuration on the engine instance instead of global settings. This is backwards incompatible for custom template loaders that override __init__. However the documentation doesn't talk about __init__ and the way to pass arguments to custom template loaders isn't specified. I'm considering it a private API.
2014-11-19Simplified caching of templatetags modules.Aymeric Augustin
2014-11-16Refactored getting the list of template loaders.Aymeric Augustin
This provides the opportunity to move utility functions specific to the Django Template Language outside of django.template.loader.
2014-11-16Removed override_template_loaders and override_with_test_loader.Aymeric Augustin
They can be replaced with override_settings and that makes the corresponding tests much more obvious.
2014-11-16Moved all template loaders under django.template.loaders.Aymeric Augustin
Reformatted the code of base.Loader according to modern standards. Turned the test template loader into a regular locmem.Loader -- but didn't document it. Added a normal deprecation path for BaseLoader which is a public API. Added an accelerated deprecation path for TestTemplateLoader which is a private API.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-08-15Fixed #23269 -- Deprecated django.utils.remove_tags() and removetags filter.Tim Graham
Also the unused, undocumented django.utils.html.strip_entities() function.
2014-08-11Fixed #23261 -- Deprecated old style list support for unordered_list filter.Jaap Roes
2014-07-31Fixed #16383 -- Raised the AttributeError raised in property of an object ↵Anubhav Joshi
when used in a template. Thanks maraujop for the report and Hiroki and Tim Graham for review.
2014-07-26Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetagqingfeng
2014-07-24Fixed #21707 -- Added helpful error message when using {{ block.super }} in ↵Anubhav Joshi
base template. Thanks mitar for the suggestion.
2014-07-14Fixed #22789 -- Deprecated django.contrib.webdesign.Tim Graham
Moved the {% lorem %} tag to built-in tags.
2014-07-09Fixed #22223 -- Prevented over-escaping URLs in reverse()Claude Paroz
And follow more closely the class of characters defined in the RFC 3986. Thanks Erik van Zijst for the report and the initial patch, and Tim Graham for the review.
2014-06-03Fixed #22384 -- Deprecated reversing URLs by dotted path.Tim Graham
2014-05-22Fixed #21598 -- cleaned up template loader overrides in testsUnai Zalakain
- Template loader overriding is managed with contexts. - The test loader is a class (function based loaders entered deprecation timeline in 1.4). - Template loader overrider that overrides with test loader added.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-04-08Fixed #13408 -- Deprecated silent unpacking exception passing in for ↵e0ne
template tag. Thanks peterbe for the suggestion.
2014-04-06Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi
2014-03-28Fixed #22306 -- Deprecated future versions of cycle and firstof template tags.Maxime Turcotte
2014-03-21The cycle and firstof tags no longer raise warnings.Aymeric Augustin
Refs #17906.