summaryrefslogtreecommitdiff
path: root/django/template
AgeCommit message (Collapse)Author
2012-04-24Fixed #18037 -- Changed behaviour of url and ssi template tags to the new ↵Claude Paroz
syntax, as per official deprecation timeline. Thanks Ramiro Morales and Jannis Leidel for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11Fixed #18103 -- Regression introduced in r17895.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10Fixed #17229 -- Allow 'True', 'False' and 'None' to resolve to the ↵Aymeric Augustin
corresponding Python objects in templates. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-07Fixed #15683 -- Prevented escaped string to be needlessly marked safe twice ↵Claude Paroz
in force_escape filter. Thanks tyrion for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-21Fixed #17660 -- Standardize extends tag token parsingChris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-14Fixed #17675 -- Changed the implementation of the {% regroup %} template tag ↵Aymeric Augustin
to use the context properly when resolving expressions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-02Fixed loader_tags.py to import token_kwargs from the correct moduleAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-28Made a tiny performance improvement in the template system's Parser.parse() ↵Adrian Holovaty
-- don't look up the global variables TOKEN_TEXT, etc. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-27Made a small optimization to the template lexer. There's no need to ↵Adrian Holovaty
calculate the len of VARIABLE_TAG_START, et al, each time we create a token. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-24Fixed #15092 -- Made `{% now %}` work with single-quoted string arguments. ↵Julien Phalip
Thanks to ninja_otoko for the report and to steveire, Aymeric Augustin and Claude Paroz for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-15Made dictsort and dictsort reversed template filters fail silentlyRamiro Morales
when passed list of things that aren't dictionaries. Thanks Harris Lapiroff for the report and Daniel Barreto for the patch. Fixes #15652. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-03Fixed #17496 -- Regression in the floatformat template filter, introduced by ↵Aymeric Augustin
the fix for #15789. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-30Fixed #15789 -- Set the decimal precisio to avoid an exception in the ↵Aymeric Augustin
floatformat filter, and added a few more tests. Thanks akaihola for the report, igalarzab for the patch and ptone for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-30Fixed #17303 -- Ensured the list of template loaders is fully loaded before ↵Aymeric Augustin
it is cached. Thanks andrey DOT gtx AT gmail DOT com for the report and patch, and Anssi Kääriäinen for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-24Fixed #17110 -- Mentionned that the {% filter %} tag doesn't support the ↵Aymeric Augustin
'safe' and 'escape' filters. Thanks benspaulding. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed various dodgy behavioursAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed #11166 -- {% widthratio %} should return 0 when the maximum is 0, no ↵Aymeric Augustin
matter the value. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed #17233 -- Fixed typo in defaultfilters.py docstring. Thanks, aalexapolskyAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09Fixed #17348 -- Implemented {% elif %}. Refs #3100.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09Fixed #3100 -- Added support for arguments on intermediate tag tokens.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-04Fixed #17343 -- Changed the {% now %} tag to use the current time zone when ↵Aymeric Augustin
time zone support is enabled. Thanks oinopion for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21Fixed #16787 -- Restored the ability to {% load %} template tags libraries ↵Aymeric Augustin
within packages. Thanks Ivan Sagalaev for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Fixed #17255 -- Removed "as" prefix from new timezone template filter names ↵Jannis Leidel
for the sake of clarity. Cheers to Aymeric Augustin for bearing with me. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-30Fixed #17135 -- Made it possible to use decorators (like stringfilter) on ↵Aymeric Augustin
template filter functions in combination with auto-escaping. Refs #16726. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29Made the defaultfilters tests run on the actual filters, not on functions ↵Aymeric Augustin
imported from django.utils. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29Used the decorator syntax consistently to register template filters.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29Used the decorator syntax consistently for stringfilter. Fixed linebreaks ↵Aymeric Augustin
that was decorated twice. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-19Fixed #14806 -- Added support for contextual translations to the `trans` and ↵Julien Phalip
`blocktrans` template tags. Thanks to jtiai for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17Remove several more relative imports.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11Simplify some code to have one loop, rather than two.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11Change some string literals to be unicode, because:Alex Gaynor
* It's the most micro of optimizations (forget I even said it) * It makes significantly more sense semantically, given these are functions which return unicode. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30Fixed #16935 - misleading message if AttributeError escapes during ↵Luke Plant
SimpleTemplateResponse.render Thanks to isagalaev for the report. As discussed on django-devs, this reverts some of the changes in [16568] i.e. the addition of `SimpleTemplateResponse.__getattr__`, because this makes it much harder to debug the common case of an AttributeError somewhere during the rendering of a SimpleTemplateResponse. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-27Fixed #13956 -- Enabled `*args` and `**kwargs` support for `simple_tag`, ↵Julien Phalip
`inclusion_tag` and `assignment_tag`. Many thanks to Stephen Burrows for the report and initial patch, to Gregor Müllegger for the initial tests, to SamBull for the suggestions, and to Jannis Leidel for the review and PEP8 cleanup. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-25Fixed #16927 -- Corrected the `{% ifchanged %}` template tag's ↵Julien Phalip
documentation. Thanks to sebastian for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21Fixed #16866 -- Clearer error message if empty list is passed to ↵Carl Meyer
select_template. Thanks Silver_Ghost for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18Fixed #16676 -- Corrected the behavior of the 'add' template filter to ↵Julien Phalip
return an empty string instead of the given value unchanged in the case of an invalid use. Thanks to dtrebbien for the report and to Aymeric Augustin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16Fixed #16770 -- Eliminated TemplateSyntaxError wrapping of exceptions. ↵Carl Meyer
Thanks to Justin Myles-Holmes for report and draft patch. Exceptions raised in templates were previously wrapped in TemplateSyntaxError (in TEMPLATE_DEBUG mode only) in order to provide template source details on the debug 500 page. The same debug information is now provided by annotating exceptions rather than wrapping them. This makes catching exceptions raised from templates more sane, as it's consistent in or out of DEBUG, and you can catch the specific exception(s) you care about rather than having to also catch TemplateSyntaxError and unwrap it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-15Fixed #16848 - Adjusted SimpleTemplateResponse.__init__ to be less brittle.Carl Meyer
Could have reverted r16830 instead, but HttpResponse shouldn't have to dance around and do non-obvious things to keep TemplateResponse happy, TemplateResponse should be robust against the possibility that HttpResponse.__init__ might set self.content. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10Kill some more dead code.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10Make a comment more accurate.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-27Fix a small thread safety issue in ExtendsNode. No tests, but Malcolm said ↵Chris Beaven
that's ok, honest. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22Silenced a "classic division" warning in floatformat template filter.Malcolm Tredinnick
Fixes #16514. Thanks, Mike Blume. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12Fixed #5831 -- Made sure the ForNode reports the correct source of an ↵Jannis Leidel
exception happening in one of the loops. Thanks, Charmless and vladmos. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29Fixed #14288 -- Fixed linebreaksbr template filter to normalize newlines ↵Jannis Leidel
first. Thanks, Julien Phalip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29Fixed #16326 -- Fixed re-pickling of unpickled TemplateResponse instances. ↵Jannis Leidel
Thanks, natrius and lrekucki. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-25Fixed #16510 -- Actually added new truncatechars filter to the builtins and ↵Jannis Leidel
fixed a typo. Thanks, timdumol. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-14Fixed #5025 -- Add a "truncatechars" template filter. Many thanks to Chris ↵Jannis Leidel
Beaven. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-16Fixed #16200 -- Stopped TemplateIfParser from returning something in ↵Jannis Leidel
`__init__`. Thanks, traff. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16410 bcc190cf-cafb-0310-a4f2-bffc1f526a37