Tim Graham
2b81faab25
Fixed #28906 -- Removed unnecessary bool() calls.
2017-12-07 17:13:07 -05:00
Tim Graham
02d9419fe3
Fixed #28907 -- Removed unnecessary if statements.
2017-12-07 17:12:00 -05:00
Дилян Палаузов
d2afa5eb23
Fixed #28860 -- Removed unnecessary len() calls.
2017-12-04 10:35:23 -05:00
Дилян Палаузов
23bf4ad87f
Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().
2017-11-14 10:52:52 -05:00
Sergey Fedoseev
f152678d36
Removed unneeded iter() call in IfNode.nodelist.
2017-11-11 19:36:21 -05:00
Claude Paroz
9ec7d8e514
Fixed #28730 -- Fixed loss of precision for large integer literals in templates
...
Thanks Fraser Nevett for the report and Tim Graham for patch edits.
2017-10-21 17:20:29 +02:00
Mads Jensen
f7036b3e26
Fixed #28662 -- Silenced join template filter error if arg isn't iterable.
2017-10-20 09:46:31 -04:00
Jonas Haag
d997ab7764
Fixed #28711 -- Fixed unordered_list template filter with lazy translations.
2017-10-18 19:45:10 -04:00
Tim Graham
df0aebc893
Simplified IfNode.nodelist
2017-10-12 16:46:31 -04:00
Tim Graham
cf59392e16
Removed unused ForNode.__iter__().
...
Unknown if it was ever used.
2017-10-12 16:46:31 -04:00
Mads Jensen
ee7ab1b6e2
Refs #27546 -- Replaced hardcoded class name in ForNode.__repr__().
2017-10-05 11:23:35 -04:00
Tim Graham
39eba25f47
Passed ignore_failures as a kwarg for readability in template tags.
...
Also removed unused VariableDoesNotExist catching where failures are ignored.
2017-10-04 09:26:13 -04:00
Mariusz Felisiak
d896809a3a
Refs #23919 -- Removed unneeded float()/int() calls.
2017-10-02 08:49:26 -04:00
Mads Jensen
77d1b19623
Removed always True if check in stringfilter decorator.
2017-09-30 18:01:35 -04:00
Mads Jensen
4508fafe16
Simplified various __eq__() methods.
2017-09-28 09:18:37 -04:00
Mariusz Felisiak
00709d704e
Merged startswith() calls.
2017-09-25 09:18:29 -04:00
Tim Graham
e62165b898
Refs #27175 -- Removed exception silencing from the {% include %} template tag.
...
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Sjoerd Job Postmus
df41b5a05d
Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
...
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-20 18:04:42 -04:00
Tim Graham
6e4c6281db
Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
...
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev
f2b93b509c
Removed unneeded iter() calls.
...
A few of these were unnecessarily added in 2b281cc35e
.
2017-08-23 16:48:29 -04:00
Claude Paroz
ed77bea582
Refs #28502 -- Complemented stringformat tuple handling/test.
...
An additional test and a code change were suggested in a late review.
2017-08-22 08:45:08 -04:00
Srinivas Reddy Thatiparthy
4ead705cb3
Fixed #28502 -- Made stringformat template filter accept tuples
2017-08-21 09:04:43 +02:00
Srinivas Reddy Thatiparthy
0a24714b26
Removed unnecessary else clause in TemplateStrings.get_template().
2017-08-07 10:24:58 -04:00
Mads Jensen
550cb3a365
Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().
2017-06-28 14:07:55 -04:00
John D'Ambrosio
be68c0bf63
Fixed #28071 -- Fixed {% extends %} origin history.
2017-06-13 12:50:54 -04:00
Jon Dufresne
21046e7773
Fixed #28249 -- Removed unnecessary dict.keys() calls.
...
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Tom
94475aab80
Replaced some map() and filter() calls with generators.
2017-05-27 13:58:56 -04:00
Alexander Allakhverdiyev
a7c6c705e8
Fixed #28129 -- Allowed custom template tags to use keyword-only arguments.
2017-05-11 10:09:44 -04:00
Alexander Allakhverdiyev
620e9dd31a
Replaced django.utils.inspect.getargspec() with inspect.getfullargspec().
2017-04-27 20:42:49 -04:00
Jon Dufresne
92bc727271
Replaced temporary lists used for passing arguments with iterables.
2017-04-26 10:54:20 -04:00
kapil garg
dbfcedb499
Fixed #28001 -- Updated comment and tested context popping in ForNode.render().
2017-04-06 19:04:29 -04:00
kapil garg
002fe07622
Fixed #27974 -- Kept resolved templates constant during one rendering cycle.
...
Thanks Florian Apolloner for the initial patch.
2017-04-03 22:29:39 -04:00
Carlton Gibson
6b3724fa11
Fixed #27359 -- Made Engine.get_default() return the first DjangoTemplates engine if multiple are defined.
2017-03-31 17:26:42 -04:00
Tim Graham
e643ba8bcf
Fixed #27956 -- Fixed display of errors in an {% extends %} child.
...
Thanks Ling-Xiao Yang for the report and test, and
Preston Timmons for the fix.
2017-03-25 08:22:12 -04:00
Vytis Banaitis
3dcc351691
Refs #23919 -- Used yield from.
2017-02-23 20:06:01 -05:00
Anton Samarchyan
4696078832
Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257.
2017-02-17 11:29:38 -05:00
Tim Graham
fe2d288434
Fixed #27722 -- Reallowed using django.Template in {% include %}.
2017-02-11 06:51:57 -05:00
Claude Paroz
3a148f958d
Refs #27795 -- Removed force_text from the template layer
...
Thanks Tim Graham for the review.
2017-02-07 17:14:02 +01:00
Claude Paroz
c651331b34
Converted usage of ugettext* functions to their gettext* aliases
...
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Ryan O’Hara
7c4289d0b9
Fixed #27783 -- Switched VariableDoesNotExist.__str__() to repr() context.
...
Using __str__() and then repr'ing the result looks strange and can lead
to recursive rendering of forms.
2017-02-06 17:53:21 -05:00
Mads Jensen
86ae1d51ed
Refs #27546 -- Removed hardcoded class names in __repr__() methods.
2017-02-04 11:42:45 -05:00
Vytis Banaitis
8838d4dd49
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
2017-02-01 11:41:56 -05:00
Claude Paroz
c688336ebc
Refs #23919 -- Assumed request COOKIES and META are str
2017-01-30 14:13:29 +01:00
Claude Paroz
fee42fd99e
Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
...
Thanks Tim Graham for the review.
2017-01-26 19:49:03 +01:00
Vytis Banaitis
d1bab24e01
Refs #23919 , #27778 -- Removed obsolete mentions of unicode.
2017-01-26 08:19:27 -05:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Tim Graham
632c4ffd9c
Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.
2017-01-25 10:13:08 -05:00
Mads Jensen
ebf34c3cdc
Removed unused variables that are overwritten.
2017-01-25 09:14:05 -05:00
Claude Paroz
d2e7d15b4c
Assumed iri_to_uri always returns a string
...
Thanks Tim Graham for the review.
2017-01-23 19:59:33 +01:00
Claude Paroz
6e55e1d88a
Refs #23919 -- Replaced six.reraise by raise
2017-01-22 20:08:04 +01:00