Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #34518 -- Fixed crash of random() template filter with an empty list. | David Sanders | 2023-04-26 | 1 | -1/+4 |
| | |||||
* | Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling HttpResponse and ↵ | Mariusz Felisiak | 2023-04-12 | 1 | -7/+8 |
| | | | | | | | | subclasses." This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db. Thanks Márton Salomváry for the report. | ||||
* | Fixed #34427 -- Improved error message when context processor does not ↵ | David Sanders | 2023-03-29 | 1 | -1/+9 |
| | | | | return a dict. | ||||
* | Fixed #34363 -- Fixed floatformat crash on zero with trailing zeros. | Panagiotis H.M. Issaris | 2023-02-22 | 1 | -1/+2 |
| | | | | Regression in 08c5a787262c1ae57f6517d4574b54a5fcaad124. Follow up to 4b066bde692078b194709d517b27e55defae787c. | ||||
* | Refs #7430 -- Removed broken Template.__iter__(). | Anders Hovmöller | 2023-02-08 | 1 | -4/+0 |
| | | | Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se> | ||||
* | Refs #33476 -- Applied Black's 2023 stable style. | David Smith | 2023-02-01 | 5 | -5/+0 |
| | | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 | ||||
* | Fixed #34272 -- Fixed floatformat crash on zero with trailing zeros to zero ↵ | David Wobrock | 2023-01-19 | 1 | -1/+1 |
| | | | | | | | | decimal places. Regression in 08c5a787262c1ae57f6517d4574b54a5fcaad124. Thanks Andrii Lahuta for the report. | ||||
* | Refs #34233 -- Used str.removeprefix()/removesuffix(). | Mariusz Felisiak | 2023-01-18 | 1 | -1/+1 |
| | |||||
* | Fixed #34220 -- Moved csrf_input_lazy, csrf_token_lazy imports to the toplevel. | rajdesai24 | 2023-01-06 | 1 | -2/+1 |
| | | | This prevents random errors with partially initialized modules. | ||||
* | Fixed #34098 -- Fixed loss of precision for Decimal values in floatformat ↵ | Vlastimil Zíma | 2022-10-24 | 1 | -1/+1 |
| | | | | | filter. Regression in 12f7928f5a455e330c0a7f19bc86b37baca12811. | ||||
* | Fixed #33864 -- Deprecated length_is template filter. | Nick Pope | 2022-07-23 | 1 | -0/+7 |
| | |||||
* | Fixed #32969 -- Fixed pickling HttpResponse and subclasses. | Anv3sh | 2022-06-20 | 1 | -8/+7 |
| | |||||
* | Normalized imports of functools.wraps. | Aymeric Augustin | 2022-05-25 | 1 | -3/+3 |
| | | | | | @wraps is 10 times more common than @functools.wraps. Standardize to the most common version. | ||||
* | Fixed #33653 -- Fixed template crash when calling methods for built-in types ↵ | cheng | 2022-05-20 | 1 | -7/+10 |
| | | | | | | without required arguments. Regression in 09341856ed9008875c1cc883dc0c287670131458. | ||||
* | Fixed #33639 -- Enabled cached template loader in development. | Carlton Gibson | 2022-04-19 | 1 | -2/+1 |
| | |||||
* | Fixed #33628 -- Ignored directories with empty names in autoreloader check ↵ | Manel Clos | 2022-04-11 | 1 | -2/+2 |
| | | | | | | for template changes. Regression in 68357b2ca9e88c40fc00d848799813241be39129. | ||||
* | Removed unused Node.__iter__(). | Keryn Knight | 2022-02-16 | 1 | -3/+0 |
| | |||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 2 | -8/+15 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 25 | -615/+847 |
| | |||||
* | Fixed #33473 -- Fixed detecting changes by autoreloader in .py files inside ↵ | Hrushikesh Vaidya | 2022-02-03 | 1 | -0/+2 |
| | | | | template directories. | ||||
* | Refs #33476 -- Refactored problematic code before reformatting by Black. | Mariusz Felisiak | 2022-02-03 | 5 | -23/+32 |
| | | | | | | | | | | | | | | | | | 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], ) | ||||
* | Fixed #33474 -- Added __slots__ to Variable and FilterExpression. | Keryn Knight | 2022-02-02 | 1 | -0/+5 |
| | |||||
* | Fixed CVE-2022-22818 -- Fixed possible XSS via {% debug %} template tag. | Markus Holtermann | 2022-02-01 | 1 | -3/+6 |
| | | | | | | Thanks Keryn Knight for the report. Co-authored-by: Adam Johnson <me@adamj.eu> | ||||
* | Simplified @stringfilter decorator and Library with unwrap(). | Baptiste Mispelon | 2022-01-10 | 2 | -20/+14 |
| | | | | | | Nowadays we can use inspect.unwrap() to retrieve the innermost function object when needed, and most of the uses of _decorated_function were to access the original __name__ which is not needed because @functools.wraps sets that attribute correctly. | ||||
* | Avoided isinstance(…, Variable) calls in FilterExpression.resolve(). | Keryn Knight | 2022-01-07 | 1 | -1/+2 |
| | | | | | | 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. | ||||
* | Fixed CVE-2021-45116 -- Fixed potential information disclosure in dictsort ↵ | Florian Apolloner | 2022-01-04 | 1 | -5/+17 |
| | | | | | | | | template filter. Thanks to Dennis Brinkrolf for the report. Co-authored-by: Adam Johnson <me@adamj.eu> | ||||
* | Optimized django.template.autoreload.get_template_directories() a bit. | Adam Johnson | 2021-12-21 | 1 | -2/+3 |
| | |||||
* | Refs #32290 -- Optimized construct_relative_path() by delay computing ↵ | Keryn Knight | 2021-12-08 | 1 | -4/+4 |
| | | | | has_quotes. | ||||
* | Fixed #33302 -- Made element_id optional argument for json_script template ↵ | Baptiste Mispelon | 2021-11-22 | 1 | -2/+2 |
| | | | | | | filter. Added versionchanged note in documentation | ||||
* | Refs #32987 -- Refactored out get_template_tag_modules(). | Daniel Fairhead | 2021-10-20 | 1 | -10/+19 |
| | |||||
* | Used Path.read_text() in jinja2.get_exception_info(). | Mariusz Felisiak | 2021-09-27 | 1 | -2/+1 |
| | |||||
* | Refs #32355 -- Used @functools.lru_cache as a straight decorator. | Mariusz Felisiak | 2021-09-27 | 2 | -2/+2 |
| | |||||
* | Fixed #30086, Refs #32873 -- Made floatformat template filter independent of ↵ | Mariusz Felisiak | 2021-09-08 | 1 | -9/+31 |
| | | | | USE_L10N. | ||||
* | Refs #32919 -- Simplified Lexer.create_token() by reorganizing blocks. | Chris Jerdonek | 2021-08-25 | 1 | -21/+27 |
| | |||||
* | Refs #32919 -- Added assertion for token start in Lexer.create_token(). | Chris Jerdonek | 2021-08-25 | 1 | -3/+3 |
| | | | | | This adds an assertion in the code path where the method would otherwise return None, which isn't allowed. | ||||
* | Fixed #33036 -- Made simple_tag()/inclusion_tag() with takes_context raise ↵ | Matt Westcott | 2021-08-19 | 1 | -1/+1 |
| | | | | TemplateSyntaxError when function has no parameters. | ||||
* | Fixed #33002 -- Made DebugLexer.tokenize() more closely parallel ↵ | Chris Jerdonek | 2021-08-09 | 1 | -13/+21 |
| | | | | Lexer.tokenize(). | ||||
* | Refs #33002 -- Renamed variable from bit to token_string in Lexer.tokenize(). | Chris Jerdonek | 2021-08-09 | 1 | -4/+4 |
| | |||||
* | Refs #33002 -- Optimized Lexer.tokenize() by skipping computing lineno when ↵ | Chris Jerdonek | 2021-08-09 | 1 | -1/+1 |
| | | | | not needed. | ||||
* | Fixed #32990 -- Simplified and optimized tag regex. | Greg Twohig | 2021-08-09 | 1 | -6/+4 |
| | | | | Thanks Chris Jerdonek for the review. | ||||
* | Refs #32986 -- Moved TRANSLATOR_COMMENT_MARK to ↵ | Chris Jerdonek | 2021-08-05 | 1 | -1/+0 |
| | | | | django.utils.translation.template. | ||||
* | Fixed #32986 -- Removed unneeded str.find() call in Lexer.create_token(). | Chris Jerdonek | 2021-08-05 | 1 | -3/+1 |
| | | | | Unnecessary since 47ddd6a4082d55d8856b7e6beac553485dd627f7. | ||||
* | Fixed #32919 -- Optimized lexing & parsing of templates. | Keryn Knight | 2021-08-02 | 3 | -11/+26 |
| | | | | | | | | | | 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. | ||||
* | Fixed #28935 -- Fixed display of errors in extended blocks. | cammil | 2021-07-02 | 1 | -2/+11 |
| | | | | | | Get the template that caused the exception and get the exception info from that template, using the node that caused the exception. | ||||
* | Fixed #32824 -- Improved performance of NodeList.render(). | Keryn Knight | 2021-06-11 | 1 | -9/+4 |
| | | | | | | | | | | | This avoids the following: - checking that each item in the nodelist is a subclass of Node, - calling str() on the render_annotated() output, because it's documented that Node.render() must return a string, - calling mark_safe() on the output, when the value to be wrapped is definitively known to be a string because the result of ''.join() is always of that type, - using an intermediate list to store each individual string. | ||||
* | Refs #24121 -- Added __repr__() to AdminForm, BlockContext, ↵ | saeedblanchette | 2021-06-10 | 1 | -0/+6 |
| | | | | BlockTranslateNode, and IncludeNode. | ||||
* | Fixed #32814 -- Improved performance of TextNode. | Keryn Knight | 2021-06-07 | 1 | -0/+9 |
| | | | | This avoids calling render() and handling exceptions, which is not necessary for text nodes. | ||||
* | Refs #24121 -- Added __repr__() to Engine | abhiabhi94 | 2021-06-01 | 1 | -0/+20 |
| | |||||
* | Fixed #32744 -- Normalized to pathlib.Path in autoreloader check for ↵ | Hasan Ramezani | 2021-05-26 | 1 | -2/+5 |
| | | | | template changes. | ||||
* | Refs #24121 -- Added __repr__() to Origin and Template. | Tiago Honorato | 2021-03-17 | 1 | -0/+9 |
| |