Commit Graph

161 Commits

Author SHA1 Message Date
Mads Jensen 550cb3a365 Fixed #27818 -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
Anton Samarchyan 4696078832 Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257. 2017-02-17 11:29:38 -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
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
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
Tim Graham 990ce6386c Refs #5748 -- Removed obsolete Python/Windows workarounds in floatformat filter. 2017-01-21 13:53:35 -05:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham 60ca37d2e5 Refs #24046 -- Removed mark_for_escaping() per deprecation timeline. 2017-01-17 20:52:04 -05:00
Mariusz Felisiak 12f7928f5a Fixed #27394 -- Added scientific notation support for big integers in floatformat filter. 2016-11-15 09:07:15 -05:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Tim Graham 2f0e0eee45 Fixed #24046 -- Deprecated the "escape" half of utils.safestring. 2016-05-10 12:46:47 -04:00
Tim Graham f5ff5010cd Fixed #26483 -- Updated docs.python.org links to use Intersphinx. 2016-05-08 18:07:43 -04:00
Marko Benko 45c7acdc50 Fixed #26281 -- Added a helpful error message for an invalid format specifier to dateformat.format(). 2016-04-20 20:13:52 -04:00
Tim Graham df8d8d4292 Fixed E128 flake8 warnings in django/. 2016-04-08 09:51:06 -04:00
Andrew Kuchev e81d1c995c Fixed #25670 -- Allowed dictsort to sort a list of lists.
Thanks Tim Graham for the review.
2016-02-23 12:15:08 -05:00
Claude Paroz be9bd3348d Fixed #25758 -- Defaulted to current language FORMATs in date/time filters
Thanks Ali Lozano for the report and the initial patch, and Tim Graham for
the review.
2016-01-30 17:04:47 +01:00
userimack 60586dd737 Fixed #26125 -- Fixed E731 flake warnings. 2016-01-25 14:23:43 -05:00
pp b34ff66e5b Added missing period to "etc.". 2016-01-11 18:05:15 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Sambhav Satija dc4c8df7aa Renamed filesizeformat tag's bytes variable to avoid clash with builtin. 2015-10-27 10:40:50 -04:00
Sambhav Satija ce7dd1273e Fixed #25441 -- Added support for negative filesize to filesizeformat template filter.
Thanks Andrey Yakovlev for the initial patch.
2015-10-27 10:35:45 -04:00
Tim Graham 222d063301 Refs #23269 -- Removed the removetags template tag and related functions per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 9a3dfa2a52 Refs #23261 -- Removed old style list syntax for unordered_list filter
Per deprecation timeline.
2015-09-23 19:31:09 -04:00
Noam e291fc4757 Fixed #25031 -- Fixed a regression in the unordered_list template filter. 2015-06-27 09:37:41 -04:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04: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 d17a035132 Moved engine-related exceptions to django.template.exceptions.
With the introduction of multiple template engines these exceptions are no
longer DTL-specific. It makes more sense for them to be moved out of
DTL-related modules.
2015-05-06 17:33:47 -05:00
Jon Walsh 8d90489fe0 Fixed typo in escape_filter() docstring. 2015-03-19 07:21:38 -04:00
Erik Romijn fa350e2f30 Fixed #24464 -- Made built-in HTML template filter functions escape their input by default.
This may cause some backwards compatibility issues, but may also
resolve security issues in third party projects that fail to heed warnings
in our documentation.

Thanks Markus Holtermann for help with tests and docs.
2015-03-09 09:29:58 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
David Hoffman 03467368db Fixed #23558 -- documented slugify limitations 2014-10-30 09:02:04 -04:00
Claude Paroz cfee67ae10 Added exception name in debug error message
This can help when some exception has no error message.
2014-08-26 21:10:54 +02:00
Jaap Roes b3660d28f3 Fixed #23260: Added generator support to defaultfilters.unordered_list. 2014-08-14 10:43:44 -04:00
Jaap Roes e92b057e06 Fixed #23261 -- Deprecated old style list support for unordered_list filter. 2014-08-11 07:04:33 -04:00
Moayad Mardini 868ff4e37c Fixed #22798 -- `pluralize()` now adds plural_suffix for any `1 < d < 2`
Thanks Odd_Bloke for the report.
2014-06-10 16:04:43 -04:00
Susan Tan 484f3edf1e Fixed #18400 -- Modified length template filter to return 0 for unknown variables.
Thanks Florian for the bug report, luyikei for the initial code patch, and
Bouke for the code review feedback.
2014-06-05 15:41:56 -04:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Claude Paroz bc315266c8 Fixed #22294 -- Prevented converting length filter output to string
Thanks Steve Pike for the report.
2014-03-22 16:39:46 +01:00
Tim Graham 8b81dee60c Removed fix_ampersands template filter per deprecation timeline.
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Jeremy f94f466cd3 Fixed #19496 -- Added truncatechars_html filter.
Thanks esevece for the suggestion and  Nick Sandford and Martin Warne
for the inital work on the patch.
2014-02-13 10:27:27 -05:00
Aymeric Augustin 072e25eee7 Moved imports to the top of the defaultfilters module. 2013-12-10 21:32:58 +01:00
Christopher Medrela 7477a4ffde Fixed E125 pep8 warnings 2013-11-28 08:50:11 -05:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Alex Gaynor fe995e6cbd Fixed the remaining E302 violations int eh django package 2013-11-02 17:37:15 -07:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Ray Ashman Jr dcfc8fa972 Correct flake8 violation E261 2013-11-02 15:27:47 -04:00
Alex Gaynor 9bf5610890 Start attacking E231 violations 2013-10-24 10:30:03 -07:00