1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
Marten Kenbeek
bc7923beff Fixed #24127 -- Changed the default current_app to the 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.
2015-07-27 09:14:48 -04:00
Luke Plant
8a5eadd140 Corrected HTML-escaping behaviour of url template tag.
Due to the URL encoding applied by the tag for all parameters that might be
partly controllable by an end-user, there are no XSS/security problems
caused by this bug, only invalid HTML.
2015-07-21 14:04:58 +01:00
Matthew Somerville
839edcebb3 Fixed #21695 -- Added asvar option to blocktrans.
Thanks Bojan Mihelac for the initial patch.
2015-07-01 10:03:00 -04:00
Tim Graham
aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Matthew Somerville
a391b17ad2 Fixed #23516 -- Added caching of include tag Template objects
This also speeds up for loops that render the same template
multiple times.
2015-06-06 09:25:11 -04:00
Tomáš Ehrlich
002b3d87b5 Fixed #24230 -- Added translated language name for i18n template tag/filter. 2015-06-02 16:04:01 -04:00
Preston Timmons
655f524915 Fixed #17085, #24783 -- Refactored template library 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.
2015-05-21 09:12:06 -05:00
Preston Timmons
fb267a1d85 Updated template tests to create their own engine.
This continues work to treat Django templates as a library.
2015-04-20 09:11:37 -05:00
Craig Oldford
75bc5bc634 Fixed #12199 -- Added the ability to use "as" with the firstof template tag. 2015-04-14 07:19:47 -04:00
Preston Timmons
55f12f8709 Cleaned up the template debug implementation.
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.
2015-03-20 08:58:07 -04:00
Tim Graham
c36b60836b Fixed #24451 -- Deprecated comma-separated {% cycle %} syntax. 2015-03-07 07:42:39 -05:00
Preston Timmons
358850781f Fixed #24372 - Replaced TokenParser usage with traditional parsing. 2015-03-02 18:25:28 -05:00
Preston Timmons
3d8fee6051 Moved ifchanged tests into syntax_tests/test_if_changed.py. 2015-02-24 14:00:02 +01:00
Preston Timmons
f6d087b628 Moved cache tests into syntax_tests/test_cache.py. 2015-02-24 14:00:02 +01:00
Preston Timmons
06ffc764a9 Moved include tests into syntax_tests/test_include.py. 2015-02-24 14:00:02 +01:00
Preston Timmons
441a47e1ef Moved ssi tests into syntax_tests/test_ssi.py. 2015-02-24 14:00:02 +01:00
Tim Graham
307c0f299a Refs #24324 -- Fixed Python 2 test failures when path to Django source contains non-ASCII characters. 2015-02-17 19:03:03 -05:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Tim Graham
b84100e8e2 Removed usage of deprecated removetags in a template test. 2015-01-18 18:32:47 -05:00
Tim Graham
bd93032191 Removed ssi/url tags from future per deprecation timeline; refs #21939. 2015-01-17 13:29:52 -05:00
Tim Graham
9f51d0c86d Fixed test from refs #23913 when running tests in reverse. 2015-01-12 13:20:44 -05:00
Ola Sitarska
d563e3be68 Fixed #23913 -- Deprecated the = comparison in if template tag. 2015-01-11 15:21:01 -05:00
Preston Timmons
de9ebdd39c Fixed #24022 -- Deprecated the ssi tag. 2015-01-05 19:35:02 -05:00
Claude Paroz
51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Aymeric Augustin
92a2d049a2 Isolated template tests from Django settings. 2014-12-28 16:23:01 +01:00
Tim Graham
3bb52c5019 Refs #23890 -- Restored silencing of numpy DeprecationWarnings in template tests. 2014-12-06 11:27:15 -05: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
adacbd64a0 Fixed "no such test method" error in template_tests.
Without this patch, you couldn't run an individual test
case in template_tests.

Refs #23768
2014-12-03 13:04:23 +01:00
Preston Timmons
b872134bfc Fixed #23768 -- Rewrote template tests as unit tests. 2014-12-02 19:18:35 -05:00