summaryrefslogtreecommitdiff
path: root/django/template
AgeCommit message (Collapse)Author
2019-06-11Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and ↵Jon Dufresne
filesizeformat filters. intword and filesizeformat passed floats to ngettext() which is deprecated in Python 3.7. The rationale for this warning is documented in BPO-28692: https://bugs.python.org/issue28692. For filesizeformat, the filesize value is expected to be an int -- it fills %d string formatting placeholders. It was likely coerced to a float to ensure floating point division on Python 2. Python 3 always does floating point division, so coerce to an int instead of a float to fix the warning. For intword, the number may contain a decimal component. In English, a decimal component makes the noun plural. A helper function, round_away_from_one(), was added to convert the float to an integer that is appropriate for ngettext().
2019-05-17Fixed #30453 -- Fixed crash of simple_tag() and inclusion_tag() when ↵Batuhan Taşkaya
function is wrapped. getfullargspec() doesn't work with wrapped functions.
2019-05-07Removed unnecessary line in DebugLexer.tokenize().sanchjat
2019-05-03Fixed #20122 -- Made pluralize template filter return '' on invalid input.Tobias Kunze
2019-05-03Refs #20122 -- Corrected documentation of pluralize template filter.Tobias Kunze
2019-04-24Removed unnecessary assignments in various code.Jon Dufresne
2019-03-25Fixed #29791 -- Made Engine.render_to_string() honor autoescape.Nathan Gaberel
2019-02-06Refs #27753 -- Favored SafeString over SafeText.Tim Graham
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2019-01-18Removed template_cache attribute from cached template loader.Tom Forbes
Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
2019-01-18Fixed #30107 -- Removed unused dirs variable from cache template loader keys.Tim Graham
Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
2019-01-02Used 4 space hanging indent for dictionaries.Tim Graham
Thanks Mariusz Felisiak for auditing.
2018-09-28Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev
2018-09-26Refs #29784 -- Switched to https:// links where available.Jon Dufresne
2018-09-25Refs #29784 -- Normalized Python docs links to omit the version.Jon Dufresne
2018-08-21Fixed #29654 -- Made text truncation an ellipsis character instead of three ↵Claude Paroz
dots. Thanks Sudhanshu Mishra for the initial patch and Tim Graham for the review.
2018-08-01Fixed typos in comments and docs.luz.paz
2018-07-31Fixed #29617 -- Fixed Template crash if template_string is lazy.Dražen Odobašić
Regression in 3a148f958dddd97c1379081118c30fbede6b6bc4.
2018-07-11Simplified BaseContext.__iter__().Sergey Fedoseev
2018-07-09Removed unneded str() calls prior to mark_safe(); simplified mark_safe().Sergey Fedoseev
2018-05-26Fixed #29432 -- Allowed passing an integer to the slice template filter.ryabtsev
2018-05-25Fixed #29400 -- Fixed crash in custom template filters that use decorated ↵Ryan Rubin
functions. Regression in 620e9dd31a2146d70de740f96a8cb9a6db054fc7.
2018-05-10Replaced TOKEN_* constants by TokenType enums.Claude Paroz
Thanks Tim Graham for the review.
2018-05-03Used double quotation marks for csrf form element.CHI Cheng
2018-04-19Ref #23919 -- Replaced some os.path usage with pathlib.Path.Tom
2018-04-04Fixed #29288 -- Made {% widthratio %} assign to as var if an exception occurs.Jirka Vejrazka
2018-03-24Removed unnecessary variable in Lexer.create_token().Mads Jensen
2018-02-26Refs #28909 -- Simplifed code using unpacking generalizations.Mariusz Felisiak
2018-02-23Fixed #29154 -- Corrected examples in pluralize docstring and added tests.Hasan Ramezani
2018-02-10Refs #27795 -- Removed force_bytes() usage in django/template/loaders/cached.py.Jon Dufresne
2018-02-07Fixed #17419 -- Added json_tag template filter.Jonas Haag
2018-01-25Fixed #29060 -- Made {% firstof %} assign '' to the asvar if all inputs are ↵Roger Gammans
false.
2018-01-21Fixed #29038 -- Removed closing slash from HTML void tags.Jon Dufresne
2017-12-26Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов
2017-12-19Simplified and improved performance of floatformat filter.Mariusz Felisiak
Thanks Sergey Fedoseev for the review.
2017-12-07Fixed #28906 -- Removed unnecessary bool() calls.Tim Graham
2017-12-07Fixed #28907 -- Removed unnecessary if statements.Tim Graham
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-11-14Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().Дилян Палаузов
2017-11-11Removed unneeded iter() call in IfNode.nodelist.Sergey Fedoseev
2017-10-21Fixed #28730 -- Fixed loss of precision for large integer literals in templatesClaude Paroz
Thanks Fraser Nevett for the report and Tim Graham for patch edits.
2017-10-20Fixed #28662 -- Silenced join template filter error if arg isn't iterable.Mads Jensen
2017-10-18Fixed #28711 -- Fixed unordered_list template filter with lazy translations.Jonas Haag
2017-10-12Simplified IfNode.nodelistTim Graham
2017-10-12Removed unused ForNode.__iter__().Tim Graham
Unknown if it was ever used.
2017-10-05Refs #27546 -- Replaced hardcoded class name in ForNode.__repr__().Mads Jensen
2017-10-04Passed ignore_failures as a kwarg for readability in template tags.Tim Graham
Also removed unused VariableDoesNotExist catching where failures are ignored.
2017-10-02Refs #23919 -- Removed unneeded float()/int() calls.Mariusz Felisiak
2017-09-30Removed always True if check in stringfilter decorator.Mads Jensen
2017-09-28Simplified various __eq__() methods.Mads Jensen