Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/template_tests/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25423 -- Made error message for unknown template ↵Pindi Albert2015-10-051-5/+12
| | | | tag more helpful.
* Fixed #25404 -- Added line numbers to ↵Dave Smith2015-09-151-1/+1
| | | | | | | TemplateSyntaxError strings. This makes it much easier to diagnose a test failure when all you have is the stack trace from an uncaught TemplateSyntaxError.
* Fixed #17085, #24783 -- Refactored template library ↵Preston Timmons2015-05-211-1/+4
| | | | | | | | registration. * Converted the ``libraries`` and ``builtins`` globals of ``django.template.base`` into properties of the Engine class. * Added a public API for explicit registration of libraries and builtins.
* Refs #24652 -- Converted a template test to avoid ↵Simon Charette2015-05-201-2/+2
| | | | executing queries.
* Fixed #15053 -- Enabled recursive template loading.Preston Timmons2015-04-221-1/+4
|
* Updated template tests to create their own engine.Preston Timmons2015-04-201-24/+21
| | | | This continues work to treat Django templates as a library.
* Cleaned up the template debug implementation.Preston Timmons2015-03-201-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | This patch does three major things: * Merges the django.template.debug implementation into django.template.base. * Simplifies the debug implementation. The old implementation copied debug information to every token and node. The django_template_source attribute was set in multiple places, some quite hacky, like django.template.defaulttags.ForNode. Debug information is now annotated in two high-level places: * Template.compile_nodelist for errors during parsing * Node.render_annotated for errors during rendering These were chosen because they have access to the template and context as well as to all exceptions that happen during either the parse or render phase. * Moves the contextual line traceback information creation from django.views.debug into django.template.base.Template. The debug views now only deal with the presentation of the debug information.
* Cleaned up template directory handling in template tests.Preston Timmons2015-02-241-4/+0
|
* Combined TemplateTests and TemplateRegressionTests.Preston Timmons2015-02-241-13/+15
|
* Moved test_token_smart_split into ParserTests.Preston Timmons2015-02-241-8/+1
|
* Moved ifchanged tests into syntax_tests/test_if_changed.py.Preston Timmons2015-02-241-28/+0
|
* Moved cache tests into syntax_tests/test_cache.py.Preston Timmons2015-02-241-41/+0
|
* Moved RequestContextTests into test_context.Preston Timmons2015-02-241-56/+3
|
* Moved TemplateTagLoading cases into test_custom.Preston Timmons2015-02-241-38/+1
|
* Moved include tests into syntax_tests/test_include.py.Preston Timmons2015-02-241-144/+0
|
* Moved ssi tests into syntax_tests/test_ssi.py.Preston Timmons2015-02-241-36/+1
|
* Cleaned up template loader tests.Preston Timmons2015-02-241-113/+4
|
* Set context.template instead of context.engine while ↵Aymeric Augustin2015-02-191-5/+2
| | | | | | | | rendering. This opens more possibilities, like accessing context.template.origin. It also follows the chain of objects instead of following a shortcut.
* Deprecated TEMPLATE_DEBUG setting.Aymeric Augustin2015-02-151-20/+35
|
* Fixed #24338 -- Accepted Template wrapper in {% extends %}.Aymeric Augustin2015-02-141-1/+11
| | | | | | | | 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.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-5/+8
|
* Deprecated passing a Context to a generic Template.render.Aymeric Augustin2015-01-121-6/+6
| | | | | | | | | | | 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.
* Fixed #24022 -- Deprecated the ssi tag.Preston Timmons2015-01-061-1/+3
|
* Deprecated TEMPLATE_CONTEXT_PROCESSORS.Aymeric Augustin2014-12-281-4/+5
|
* Deprecated TEMPLATE_DIRS.Aymeric Augustin2014-12-281-6/+3
|
* Deprecated TEMPLATE_LOADERS.Aymeric Augustin2014-12-281-34/+65
|
* Deprecated TEMPLATE_STRING_IF_INVALID.Aymeric Augustin2014-12-281-1/+7
|
* Deprecated ALLOWED_INCLUDE_ROOTS.Aymeric Augustin2014-12-281-8/+7
|
* Supported multiple template engines in get_template and ↵Aymeric Augustin2014-12-281-3/+3
| | | | | | | | select_template. 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).
* Cleaned up the django.template namespace.Aymeric Augustin2014-12-281-2/+3
| | | | | | | | | 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.
* Fixed #23958 -- Rewrote filter tests as unit tests.Preston Timmons2014-12-061-120/+0
|
* Converted recently refactored templates tests to ↵Ramiro Morales2014-12-041-6/+6
| | | | | | | | SimpleTestCase. These test methods don't need DB setup/teardown. Refs #23768 and b872134b.
* Removed redundant numbered parameters from str.format().Berker Peksag2014-12-031-2/+2
| | | | Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
* Fixed #23768 -- Rewrote template tests as unit tests.Preston Timmons2014-12-031-1356/+4
|
* Fixed #23914 -- Improved {% now %} to allow storing its ↵Baptiste Mispelon2014-11-251-0/+2
| | | | | | result in the context. Thanks to Tim for the review.
* Fixed #23890 -- Silenced numpy DeprecationWarnings in ↵Tim Graham2014-11-251-0/+7
| | | | template tests.
* Encapsulated TEMPLATE_STRING_IF_INVALID in Engine.Aymeric Augustin2014-11-231-10/+5
|
* Moved template loaders management in Engine.Aymeric Augustin2014-11-231-6/+4
| | | | | | | | | | | 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.
* Simplified caching of templatetags modules.Aymeric Augustin2014-11-191-5/+0
|
* Refactored getting the list of template loaders.Aymeric Augustin2014-11-161-16/+25
| | | | | This provides the opportunity to move utility functions specific to the Django Template Language outside of django.template.loader.
* Removed override_template_loaders and ↵Aymeric Augustin2014-11-161-17/+21
| | | | | | | override_with_test_loader. They can be replaced with override_settings and that makes the corresponding tests much more obvious.
* Moved all template loaders under django.template.loaders.Aymeric Augustin2014-11-161-2/+2
| | | | | | | | | | | | 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.
* Fixed #23620 -- Used more specific assertions in the ↵Berker Peksag2014-11-031-5/+5
| | | | Django test suite.
* Fixed #23269 -- Deprecated django.utils.remove_tags() ↵Tim Graham2014-08-151-1/+2
| | | | | | and removetags filter. Also the unused, undocumented django.utils.html.strip_entities() function.
* Fixed #23261 -- Deprecated old style list support for ↵Jaap Roes2014-08-111-0/+2
| | | | unordered_list filter.
* Fixed #16383 -- Raised the AttributeError raised in ↵Anubhav Joshi2014-07-311-2/+9
| | | | | | property of an object when used in a template. Thanks maraujop for the report and Hiroki and Tim Graham for review.
* Fixed #23060 -- Prevented UnicodeDecodeError in debug ↵qingfeng2014-07-261-0/+10
| | | | templatetag
* Fixed #21707 -- Added helpful error message when using ↵Anubhav Joshi2014-07-241-0/+3
| | | | | | {{ block.super }} in base template. Thanks mitar for the suggestion.
* Fixed #22789 -- Deprecated django.contrib.webdesign.Tim Graham2014-07-141-0/+2
| | | | Moved the {% lorem %} tag to built-in tags.
* Fixed #22223 -- Prevented over-escaping URLs in reverse()Claude Paroz2014-07-091-3/+3
| | | | | | | 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.