summaryrefslogtreecommitdiff
path: root/django/templatetags
AgeCommit message (Collapse)Author
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-04-09Sorted imports in django/templatetags/tz.py per isort.Sarah Boyce
2025-04-09Fixed #35986 -- Fixed test classes with @translation.override decorator.Ahmed Nassar
Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-02-18Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.Mariusz Felisiak
datetime.UTC was added in Python 3.11.
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2023-01-18Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak
2023-01-17Refs #32365 -- Removed support for pytz timezones per deprecation timeline.Mariusz Felisiak
2023-01-17Refs #32873 -- Removed settings.USE_L10N per deprecation timeline.Mariusz Felisiak
2022-10-31Used more augmented assignment statements.Nick Pope
Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
2022-07-14Fixed #33631 -- Marked {% blocktranslate asvar %} result as HTML safe.cheng
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2022-01-07Avoided isinstance(…, Variable) calls in FilterExpression.resolve().Keryn Knight
By determining the variable type within __init__() instead of resolve() we can skip an isinstance() check at template runtime. Templates are executed in production more often than the parse trees themselves, assuming the cached Loader is used.
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-08-02Fixed #32919 -- Optimized lexing & parsing of templates.Keryn Knight
This optimizes: - Lexer.create_token() by avoiding startswith() calls, - Parser.parse() by re-using the token type enum's value, - Parser.extend_nodelist() by removing unnecessary isinstance() check, - some Node subclasses by removing the implicit "nodelist" from "child_nodelists", - Variable.__init__() by avoiding startswith() calls.
2021-06-10Refs #24121 -- Added __repr__() to AdminForm, BlockContext, ↵saeedblanchette
BlockTranslateNode, and IncludeNode.
2021-05-12Refs #24121 -- Added__repr__() to StaticNode.saeedblanchette
2020-09-29Fixed #18995 -- Made blocktranslate tag raise TemplateSyntaxError when ↵Jacob Walls
plural count is not a number.
2019-12-18Refs #30585 -- Updated project templates and tests to use (block)translate tags.Mike Hansen
2019-12-18Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags.Mike Hansen
2018-12-19Replaced loop with dictionary comprehension.Toivo Mattila
2018-05-10Replaced TOKEN_* constants by TokenType enums.Claude Paroz
Thanks Tim Graham for the review.
2018-03-21Refs #27656 -- Removed "This will" prefix from djanog/templatetags/i18n.py ↵Tim Graham
docstrings.
2017-11-07Fixed #28544 -- Made unlocalize template filter behave like {% localize off ↵Claude Paroz
%} tag Thanks Beda Kosata for the report and Tim Graham for the review.
2017-07-31Avoided creating temporary lists for obtaining the first item.Sergey Fedoseev
2017-03-15Fixed #27882 -- Allowed {% cache %} to cache indefinitely.Bo Marchman
2017-02-17Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257.Anton Samarchyan
2017-02-07Refs #27795 -- Removed force_text from the template layerClaude Paroz
Thanks Tim Graham for the review.
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-02-04Refs #27546 -- Removed hardcoded class names in __repr__() methods.Mads Jensen
2017-01-22Refs #23919 -- Replaced six.reraise by raiseClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-19Refs #25484 -- Made non-staticfiles {% static %} tag quote its output.Tim Graham
2016-12-19Refs #25484 -- Removed incorrect unquoting in {% static %}.Tim Graham
Regression in 374e6230ca9f9bb84cc9dd760dfb6395fbb5ff0f. Thanks Florian Apolloner for the report and analysis.
2016-12-17Fixed #25484 -- Made {% static %} render escaped URLs.alix-
2016-10-27Fixed #27327 -- Simplified time zone handling by requiring pytz.Tim Graham
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2015-12-10Fixed #21221 -- Made form Media and static template tag use staticfiles if ↵Johannes Hoppe
installed.
2015-09-23Refs #22306 -- Removed cycle/firstof template tags from "future".Tim Graham
Per deprecation timeline.
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
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-07-01Fixed #21695 -- Added asvar option to blocktrans.Matthew Somerville
Thanks Bojan Mihelac for the initial patch.
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-02Fixed #24230 -- Added translated language name for i18n template tag/filter.Tomáš Ehrlich
2015-04-18Removed cases of six.iter* wrapped in a list()Curtis Maloney
There's absolutely no advantage [and a mild performance hit] to using six.iter* in these cases.