summaryrefslogtreecommitdiff
path: root/tests/template_tests
AgeCommit message (Collapse)Author
2015-09-21Fixed #25373 -- Added warning logging for exceptions during {% include %} ↵Nick Johnson
tag rendering.
2015-09-21Refs #18773 -- Improved template variable exception logging message.Nick Johnson
2015-09-18Refs #25422 -- Added a test for a template tag with type annotations.Thomas Orozco
This doesn't work in Django 1.8 but was fixed in Django 1.9 as a side effect of another change.
2015-09-15Fixed #25404 -- Added line numbers to TemplateSyntaxError strings.Dave Smith
This makes it much easier to diagnose a test failure when all you have is the stack trace from an uncaught TemplateSyntaxError.
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-09-11Fixed #24765 -- Allowed template context updates to flatten a Context.Buddy Lindsey, Jr
2015-08-12Fixed #24257 -- Corrected i18n handling of percent signs.Doug Beck
Refactored tests to use a sample project. Updated extraction: * Removed special handling of single percent signs. * When extracting messages from template text, doubled all percent signs so they are not interpreted by gettext as string format flags. All strings extracted by gettext, if containing a percent sign, will now be labeled "#, python-format". Updated translation: * Used "%%" for "%" in template text before calling gettext. * Updated {% trans %} rendering to restore "%" from "%%".
2015-08-08Refs #25236 -- Removed ifequal/ifnotequal usage.Tim Graham
2015-08-08Updated Wikipedia links to use httpsClaude Paroz
2015-07-27Fixed #24127 -- Changed the default current_app to the current namespace.Marten Kenbeek
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-21Corrected HTML-escaping behaviour of url template tag.Luke Plant
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-16Fixed #25120 -- Deprecated egg template loader.Tim Graham
2015-07-01Fixed #21695 -- Added asvar option to blocktrans.Matthew Somerville
Thanks Bojan Mihelac for the initial patch.
2015-06-30Used %r in the TextNode repr to show newlines better.Ned Batchelder
2015-06-29Fixed #25018 -- Changed simple_tag to apply conditional_escape() to its output.Luke Plant
This is a security hardening fix to help prevent XSS (and incorrect HTML) for the common use case of simple_tag. Thanks to Tim Graham for the review.
2015-06-27Fixed #25031 -- Fixed a regression in the unordered_list template filter.Noam
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-06Fixed #23516 -- Added caching of include tag Template objectsMatthew Somerville
This also speeds up for loops that render the same template multiple times.
2015-06-02Fixed #24230 -- Added translated language name for i18n template tag/filter.Tomáš Ehrlich
2015-05-27Fixed #24847 -- Prevented items set on a RequestContext from being lost.Paweł Marczewski
2015-05-21Fixed #17085, #24783 -- Refactored template library registration.Preston Timmons
* 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-20Refs #24652 -- Converted a template test to avoid executing queries.Simon Charette
2015-04-28Fixed template_tests failure on Windows.Tim Graham
2015-04-22Fixed #15053 -- Enabled recursive template loading.Preston Timmons
2015-04-20Updated template tests to create their own engine.Preston Timmons
This continues work to treat Django templates as a library.
2015-04-14Fixed #24603 -- Allowed Context.update() to be used as a context manager.Tommy Beadle
2015-04-14Fixed #12199 -- Added the ability to use "as" with the firstof template tag.Craig Oldford
2015-04-01Fixed #23441, #24555 -- Improved the behavior of InclusionNode.Preston Timmons
This change: * Makes the InclusionNode cache-safe by removing render-time side effects to its nodelist. * Ensures the render_context stack is properly scoped and reset by updating the render call to use Template.render rather than Nodelist.render.
2015-03-27Fixed #18773 -- Added logging for template variable resolvingCaroline Simpson
Added a django.template logger without a default handler. Added logging if there is an exception while resolving variables in a template.
2015-03-20Cleaned up the template debug implementation.Preston Timmons
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-16Fixed #24493 -- Added BaseContext.setdefault()Preston Timmons
2015-03-10Fixed #24471 -- Enhanced urlize regex to exclude quotes and angle brackets.Tim Graham
2015-03-10Fixed escaping regression in urlize filter.Tim Graham
Now that the URL is always unescaped as of refs #22267, we should re-escape it before inserting it into the anchor.
2015-03-09Fixed #24464 -- Made built-in HTML template filter functions escape their ↵Erik Romijn
input by default. This may cause some backwards compatibility issues, but may also resolve security issues in third party projects that fail to heed warnings in our documentation. Thanks Markus Holtermann for help with tests and docs.
2015-03-07Fixed #24451 -- Deprecated comma-separated {% cycle %} syntax.Tim Graham
2015-03-06Fixed urlize regression with entities in query stringsClaude Paroz
Refs #22267. Thanks Shai Berger for spotting the issue and Tim Graham for the initial patch.
2015-03-05Fixed test_notafile_error to pass on Windows.Preston Timmons
This test failed because a different error code is raised on Windows when opening a directory. Since the particular message isn't as important to this test as the fact that the original IOError is reraised, this fixes the test by making the assertion more generic.
2015-03-03Fixed #24399 -- Made filesystem loaders use more specific exceptions.Preston Timmons
2015-03-02Fixed #24372 - Replaced TokenParser usage with traditional parsing.Preston Timmons
2015-03-02Fixed #24409 -- Combined the app_directories and filesystem loader ↵Preston Timmons
implementation. Besides the directories they look in, these two loaders are functionally the same. This removes unnecessary code duplication between the two.
2015-02-24Cleaned up template directory handling in template tests.Preston Timmons
2015-02-24Combined TemplateTests and TemplateRegressionTests.Preston Timmons
2015-02-24Moved test_token_smart_split into ParserTests.Preston Timmons
2015-02-24Moved ifchanged tests into syntax_tests/test_if_changed.py.Preston Timmons
2015-02-24Moved cache tests into syntax_tests/test_cache.py.Preston Timmons
2015-02-24Moved RequestContextTests into test_context.Preston Timmons
2015-02-24Moved TemplateTagLoading cases into test_custom.Preston Timmons
2015-02-24Moved include tests into syntax_tests/test_include.py.Preston Timmons
2015-02-24Moved ssi tests into syntax_tests/test_ssi.py.Preston Timmons
2015-02-24Cleaned up template loader tests.Preston Timmons