summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_basic.py
AgeCommit message (Collapse)Author
2025-04-17Fixed #28050 -- Added template name to TemplateSyntaxError.farhan
2024-09-17Fixed #35735 -- Enabled template access to methods and properties of classes ↵Fabian Braun
with __class_get_item__.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-06-10Refs #24121 -- Added __repr__() to AdminForm, BlockContext, ↵saeedblanchette
BlockTranslateNode, and IncludeNode.
2019-09-24Removed some outdated backwards compatibility imports and misleading comments.Mads Jensen
EmptyResultSet moved in 46509cf13dbf049f75077981c29ef2c60b5a96ab. FieldDoesNotExist moved in 8958170755b37ce346ae5257c1000bd936faa3b0. BoundField and pretty_name moved in 8550161e531a603d57723850fb09c4c9b7ca60b9. EMPTY_VALUES moved in 471596fc1afcb9c6258d317c619eaf5fd394e797. BaseRunserverCommand moved in 5c53e30607014163872e89c221b206992a9acfef.
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-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-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-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-28Isolated template tests from Django settings.Aymeric Augustin
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-02Fixed #23768 -- Rewrote template tests as unit tests.Preston Timmons