Aymeric Augustin
3dc01aaaaf
Deprecated ALLOWED_INCLUDE_ROOTS.
2014-12-28 17:02:30 +01:00
Aymeric Augustin
4ea43ac915
Supported multiple template engines in get_template and 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).
2014-12-28 16:23:01 +01:00
Aymeric Augustin
7eefdbf7ab
Cleaned up the django.template namespace.
...
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-28 14:47:31 +01:00
Preston Timmons
5c68870169
Fixed #23958 -- Rewrote filter tests as unit tests.
2014-12-06 10:57:46 -05:00
Ramiro Morales
16f26defa7
Converted recently refactored templates tests to SimpleTestCase.
...
These test methods don't need DB setup/teardown.
Refs #23768 and b872134b
.
2014-12-03 18:56:46 -05:00
Berker Peksag
560b4207b1
Removed redundant numbered parameters from str.format().
...
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Preston Timmons
b872134bfc
Fixed #23768 -- Rewrote template tests as unit tests.
2014-12-02 19:18:35 -05:00
Baptiste Mispelon
c335c0fee9
Fixed #23914 -- Improved {% now %} to allow storing its result in the context.
...
Thanks to Tim for the review.
2014-11-25 22:11:35 +01:00
Tim Graham
d43dd03ca3
Fixed #23890 -- Silenced numpy DeprecationWarnings in template tests.
2014-11-25 09:09:13 -05:00
Aymeric Augustin
47a131b944
Encapsulated TEMPLATE_STRING_IF_INVALID in Engine.
2014-11-23 11:53:53 +01:00
Aymeric Augustin
29a977ab14
Moved template loaders management in Engine.
...
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-23 11:52:12 +01:00
Aymeric Augustin
a97e72aaab
Simplified caching of templatetags modules.
2014-11-19 21:35:39 +01:00
Aymeric Augustin
9eeb788cfb
Refactored getting the list of template loaders.
...
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
2014-11-16 21:41:44 +01:00
Aymeric Augustin
b503fee7ec
Removed override_template_loaders and override_with_test_loader.
...
They can be replaced with override_settings and that makes the
corresponding tests much more obvious.
2014-11-16 21:40:50 +01:00
Aymeric Augustin
2577ae6a08
Moved all template loaders under django.template.loaders.
...
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-16 21:28:26 +01:00
Berker Peksag
f7969b0920
Fixed #23620 -- Used more specific assertions in the Django test suite.
2014-11-03 11:56:37 -05:00
Tim Graham
e122facbd8
Fixed #23269 -- Deprecated django.utils.remove_tags() and removetags filter.
...
Also the unused, undocumented django.utils.html.strip_entities() function.
2014-08-15 08:20:02 -04:00
Jaap Roes
e92b057e06
Fixed #23261 -- Deprecated old style list support for unordered_list filter.
2014-08-11 07:04:33 -04:00
Anubhav Joshi
0dd05c9e66
Fixed #16383 -- Raised the AttributeError raised in property of an object when used in a template.
...
Thanks maraujop for the report and Hiroki and Tim Graham for review.
2014-07-31 09:13:55 -04:00
qingfeng
08451f17d0
Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag
2014-07-26 18:03:19 +02:00
Anubhav Joshi
b1abfb3c59
Fixed #21707 -- Added helpful error message when using {{ block.super }} in base template.
...
Thanks mitar for the suggestion.
2014-07-24 14:22:19 -04:00
Tim Graham
38e001ab6c
Fixed #22789 -- Deprecated django.contrib.webdesign.
...
Moved the {% lorem %} tag to built-in tags.
2014-07-14 08:45:19 -04:00
Claude Paroz
e167e96cfe
Fixed #22223 -- Prevented over-escaping URLs in reverse()
...
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-07-09 09:54:34 +02:00
Tim Graham
4445d36d47
Fixed #22384 -- Deprecated reversing URLs by dotted path.
2014-06-03 07:30:14 -04:00
Unai Zalakain
4dc4d12e27
Fixed #21598 -- cleaned up template loader overrides in tests
...
- 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-05-22 18:35:16 -04:00
Alex Gaynor
2bcb8bfc8d
Fix many many typos in comments throughout the codebase
2014-04-26 10:18:45 -07:00
e0ne
2aaa045c61
Fixed #13408 -- Deprecated silent unpacking exception passing in for template tag.
...
Thanks peterbe for the suggestion.
2014-04-08 13:55:17 -04:00
Anubhav Joshi
cd914e31c9
Fixed #21977 -- Deprecated SimpleTestCase.urls
2014-04-06 17:33:43 -04:00
Maxime Turcotte
5e4e0b6fe9
Fixed #22306 -- Deprecated future versions of cycle and firstof template tags.
2014-03-28 18:55:06 -04:00
Aymeric Augustin
ad3942d325
The cycle and firstof tags no longer raise warnings.
...
Refs #17906 .
2014-03-21 21:40:04 +01:00
Tim Graham
1ea44a3abd
Switched {% cycle %} and {% firstof %} tags to auto-escape their variables per deprecation timeline.
...
refs #17906 .
2014-03-21 13:17:10 -04:00
Tim Graham
8b81dee60c
Removed fix_ampersands template filter per deprecation timeline.
...
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Tim Graham
35f46ec7a9
Fixed flake8 warnings.
2014-03-21 06:24:45 -04:00
Anubhav Joshi
659b5678fc
Fixed #22184 -- Allowed template_tests.tests to be run isolated
2014-03-15 12:34:11 +01:00
Aymeric Augustin
3a34f71d4d
Removed obsolete hack to run template tests.
2014-03-09 11:07:21 +01:00
Claude Paroz
210d0489c5
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
...
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Erik Romijn
775975f15d
Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html()
2014-03-01 14:07:57 +01:00
Tim Graham
72b080c2c8
Removed Django 1.5 upgrade hints for {% url %} tag.
...
Refs #19280 and Refs #19392 .
2014-02-28 07:18:45 -05:00
Baptiste Mispelon
81cd3a7460
Use assertEqual instead of assertEquals.
2014-02-17 04:58:31 +01:00
Zbigniew Siciarz
74d4d58b62
Fixed #21939 -- Deprecated loading ssi/url tags from future.
2014-02-16 13:25:21 +01:00
Marek Wywiał
d97bf2e9c8
Fixed #21765 -- Added support for comparing Context instances
2014-02-15 17:14:28 +01:00
Aymeric Augustin
07ae47f7f8
Fixed #21959 -- Handled Inf/NaN in widthratio tag.
...
Thanks rmoe for the report and the patch.
2014-02-08 21:01:55 +01:00
Claude Paroz
02add43568
Fixed #21417 -- Expanded TEMPLATE_STRING_IF_INVALID in blocktrans
...
Thanks keturn for the reporti, Chris Medrela for details and
Tim Graham for the review.
Refs #19915 .
2014-02-08 11:06:54 +01:00
Aymeric Augustin
b951a7fbc1
Removed superfluous uses of TransRealMixin.
...
The translation.override context manager cleans up after itself. As a
consequence this mixin isn't needed any more in many cases.
2014-01-27 22:01:22 +01:00
Carl Meyer
ca95f8e435
Moved sys.path-extending decorator to django.test.utils and used throughout test suite.
...
Thanks Aymeric for the suggestion.
2014-01-25 22:50:40 -07:00
Marc Tamlyn
2607fa9016
Fixed #21774 -- Isolate all test urls from eachother.
...
This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:
- d.c.auth depends on d.c.admin (because of the is_admin flag to some
views), but this is not so important and d.c.admin is in
always_installed_apps
- test_client_regress depends on test_client. Eventually these should
become a single module, as the split serves no useful purpose.
2014-01-14 15:43:27 +00:00
Aymeric Augustin
da16bb30ff
Dropped AppCache._empty, _with_app and _without_app.
...
It's now easier to achieve the same effect with modify_settings or
override_settings.
2013-12-23 21:37:56 +01:00
Aymeric Augustin
2fef9e5375
Moved apps back in the toplevel django namespace.
...
Reverted 4a56a93cc4
.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
65cd74be8e
Stopped iterating on INSTALLED_APPS.
...
Used the app cache's get_app_configs() method instead.
2013-12-22 11:39:18 +01:00