Augusto Pontes
8bef309e96
Moved test method to ParserTests
2025-11-14 06:15:17 -03:00
Augusto Pontes
c914b8b209
Removed unused lib
2025-11-13 14:34:39 -03:00
Augusto Pontes
78aa21ac99
Fixed testfiterexpression in test_parser
2025-11-13 14:30:59 -03:00
Augusto Pontes
8367c6352a
Fixed isort linter
2025-11-10 17:58:59 -03:00
Augusto Pontes
ed86951c50
Fixed black, isort, flake linters
2025-11-10 17:56:36 -03:00
Augusto Pontes
7d68cf8db0
Changed args_check parameters, Created class to verify deferred annotations only in python 3.14+ version
2025-11-10 17:46:06 -03:00
haileyajohnson
22506b2c16
Fixed #36465 , Refs #35816 -- Disallowed '+' and '-' characters in template variable names.
...
Docs / docs (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Regression in 5183f7c287 .
Thank you to Jon Banafato and Baptiste Mispelon for the report.
2025-06-18 14:04:39 +02:00
haileyajohnson
5183f7c287
Fixed #35816 -- Handled parsing of scientific notation in DTL. ( #19213 )
...
* Refs #35816 -- Improved test coverage of FilterExpression.
* Fixed #35816 -- Made FilterExpression parse scientific numbers.
---------
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-03-11 08:02:27 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
...
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
34d5336b9d
Added test for TemplateSyntaxError when variables begin with underscores.
2021-08-02 11:37:39 +02:00
David Smith
179ee13eb3
Refs #24121 -- Added __repr__() to FilterExpression, Lexer, Parser, and Token.
2021-02-26 10:25:08 +01:00
Claude Paroz
9c4ea63e87
Replaced TOKEN_* constants by TokenType enums.
...
Thanks Tim Graham for the review.
2018-05-10 17:51:51 +02:00
Mads Jensen
a51c4de194
Used assertRaisesMessage() to test Django's error messages.
2017-07-29 19:07:23 -04:00
Tim Graham
109b33f64c
Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.
2017-01-20 08:49:47 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
b5f0b3478d
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
2016-12-07 17:42:31 -05:00
Ramin Farajpour Cami
0a63ef3f61
Fixed #27463 -- Fixed E741 flake8 warnings.
2016-11-14 17:40:28 -05:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05: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
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
Preston Timmons
358850781f
Fixed #24372 - Replaced TokenParser usage with traditional parsing.
2015-03-02 18:25:28 -05:00
Preston Timmons
25a0b5cdcd
Moved test_token_smart_split into ParserTests.
2015-02-24 14:00:03 +01:00
Aymeric Augustin
15b711b5ee
Deprecated TEMPLATE_DEBUG setting.
2015-02-15 20:47:04 +01:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05: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
Aymeric Augustin
e32095616c
Imported override_settings from its new location.
2013-12-23 21:37:56 +01:00
Loic Bistuer
a2814846ca
Fixed E124 pep8 warnings.
2013-12-10 15:12:48 -05:00
Alasdair Nicol
c3aa2948c6
Fixed #21298 -- Fixed E301 pep8 warnings
2013-10-23 13:45:03 +01:00
Alasdair Nicol
a800036981
Fixed #21287 -- Fixed E123 pep8 warnings
2013-10-18 10:07:39 +01:00
Tim Graham
7fec5a2240
Fixed #7557 -- Added type checking to Variable initialization.
...
Thanks tobias for the suggestion and boblefrag and saz for work on the
patch.
2013-09-19 09:27:19 -04:00
Curtis Maloney
7c6f2ddcd9
Simplify FilterExpression.args_check
2013-09-09 09:03:50 -04:00
Aymeric Augustin
cfcf4b3605
Stopped using django.utils.unittest in the test suite.
...
Refs #20680 .
2013-07-01 14:29:33 +02:00
Preston Timmons
3810dc3070
Modified template_tests for unittest2 discovery.
2013-04-12 15:13:59 -06:00