summaryrefslogtreecommitdiff
path: root/django/template
AgeCommit message (Collapse)Author
2011-06-11Fixed #11989 -- Allow passing a Template instance to inclusion_tag. Thanks ↵Jannis Leidel
to Jeremy Dunck and tcoenen. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11Fixed #12847 -- Added name parameter to simple_tag, assignment_tag and ↵Jannis Leidel
inclusion_tag helpers. Thanks, vladmos. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-27Tweaked some changes from [16283] to fix failures in i18n and defaultfilters ↵Ramiro Morales
regression tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-27Moved a bunch of imports in the defaultfilters library out of functions. On ↵Alex Gaynor
CPython this is actually a big performance win if one of these filters is your bottleneck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24Fixed #16004 - csrf_protect does not send cookie if view returns ↵Luke Plant
TemplateResponse The root bug was in decorator_from_middleware, and the fix also corrects bugs with gzip_page and other decorators. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07Fixed #15263 -- Added support for format localization to the now template ↵Jannis Leidel
tag. Thanks to danielr and dmclain. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-03Fixed #14262 -- Added new assignment_tag as a simple way to assign the ↵Jannis Leidel
result of a template tag to a context variable. Thanks, Julien Phalip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-01Replaced old-style with new-style decorator syntax.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-28Fixed #15070 -- Also pass current_app and use_l10n in inclusion_tags. ↵Jannis Leidel
Thanks, raony, mk and goodtune. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-19Fixed #15791 - method to signal that callable objects should not be called ↵Luke Plant
in templates Thanks to ejucovy for the suggestion and patch! git-svn-id: http://code.djangoproject.com/svn/django/trunk@16045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-19Fixes #15721 (again) via a minor tweak to avoid unexpected behaviour of ↵Chris Beaven
copy() which caused a range of test failures git-svn-id: http://code.djangoproject.com/svn/django/trunk@16044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-17Fixes #15721 -- Make {% include %} and RequestContext work together again.Chris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Advanced deprecations in django.template.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-10Removed an unused code path.Luke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-10Fixed #15572 - include with "only" option discards context properties (such ↵Luke Plant
as autoescape) Thanks to dfoerster for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08Fixed #15570 -- Corrected a flaw in the design of the silent flag on {% ↵Russell Keith-Magee
cycle %}. Thanks to Brian Neal for the report, and to Andrew and Jannis for the design consult. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Fixed #11206 -- Ensure that the floatformat template filter doesn't switch ↵Ramiro Morales
to scientific notation when asked to format a zero value with more than six decimal places. Thanks Tai Lee for the report and fix and Facundo Batista for his help when Decimal module expertise was needed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Fixed #15502 -- Ensure that nested TemplateDoesNotExist errors are ↵Russell Keith-Magee
propegated with a meaningful error message when loaded using select_template. Thanks to jaylett for the report, and GDorn for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Fixed #15530 -- Corrected typo in template loader deprecation message. ↵Russell Keith-Magee
Thanks to msaelices for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-27Fixed #15368 - test failures due to regression with RequestContextLuke Plant
Thanks to cyberdelia for the reports on this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21Fix broken tests due to changes in r15591 by updating the test ↵Chris Beaven
store_rendered_templates signal handler. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20Ensure render_to_string leaves the context instance stack in the state it ↵Chris Beaven
was originally passed in. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04Fixed #14046 -- Made {% include %} behave the same, regardless of whether ↵Russell Keith-Magee
the template included is named by variable or constant string. Thanks to defcube for the report, and George Karpenkov for the draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26Fixed #15157 -- Modified evaluation of literals surrounded by _(' and ')' in ↵Ramiro Morales
templates to be evaluated at render time instead of at compile time by using ugettext_lazy. Thanks Jonathan S for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26Fixed #13828 -- DRY'd up the dictsort(reversed) filters, will speed them up ↵Alex Gaynor
as well. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24Fixed #15012 -- Added post-rendering callbacks to TemplateResponse so that ↵Russell Keith-Magee
decorators (in particular, the cache decorator) can defer processing until after rendering has occurred. Thanks to Joshua Ginsberg for the draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24Fixed #14240 -- Enabled localization for the filesize filter. Thanks to ↵Russell Keith-Magee
David Danier for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-05Fixed #15010 -- Added current_app parameter to close gap between ↵Jannis Leidel
TemplateResponse and render method. Thanks, acdha. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-02Fixed #2986 -- Made the JavaScript code that drives related model instance ↵Ramiro Morales
addition in a popup window handle a model representation containing new lines. Also, moved the escapejs functionality yoo django.utils.html so it can be used from Python code. Thanks andrewwatts for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-19Fixed #7153 -- _resolve_lookup now does a better job of resolving callables ↵Chris Beaven
and correctly catches all silent_variable_exceptions git-svn-id: http://code.djangoproject.com/svn/django/trunk@14992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-19Fixed #14908 -- Added a 'takes_context' argument to simple_tag. Thanks to ↵Russell Keith-Magee
Julien Phalip for driving the issue and providing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18Fixes #7817 and #9456.Chris Beaven
- The include tag now has a 'with' option to include to provide extra context vairables to the included template. - The include tag now has an 'only' option to exclude the current context when rendering the included template. - The with tag now accepts multiple variable assignments. - The with, include and blocktrans tags now use a new keyword argument format for variable assignments (e.g. `{% with foo=1 bar=2 %}`). git-svn-id: http://code.djangoproject.com/svn/django/trunk@14922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-16Fixed #2411 -- Fixed some XHTML validation errors in admindocs pages. Thanks ↵Ramiro Morales
to James Wheare for the report and to Simon Greenhill for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-07Fixed #12815 -- Added TemplateResponse, a lazy-evaluated Response class. ↵Russell Keith-Magee
Thanks to Simon Willison for the original idea, and to Mikhail Korobov and Ivan Sagalaev for their assistance, including the draft patch from Mikhail. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Fixed #12201 -- Added a lineno attibute to template Token so e.g. we can ↵Ramiro Morales
report line numbers in errors during i18n literals extraction. Thanks madewulf for the report and Claude Paroz for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-27Fixed #12248 -- Refactored django.template to get code out of __init__.py, ↵Russell Keith-Magee
to help with avoiding circular import dependencies. Thanks to Tom Tobin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-24Fixes #3529 -- more explicit documentation about Context.update. Thanks for ↵Chris Beaven
the patch, ggetzie. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Fixed #4552 -- minor tidy up of the {% for %} tag's comma splittingChris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20Fixed #14389, #9666 -- Started the migration path to make the first argument ↵Russell Keith-Magee
to url and ssi template tags syntactically consistent with other tags. Thanks to Sean Brant for the draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17Fixed #10004 and #12320 -- Enabled the makemessages management command to ↵Jannis Leidel
collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02Fixed #13567 -- Added a 'silent' argument to the cycle tag, so that you can ↵Russell Keith-Magee
declare a cycle without producing a value in the template. Thanks to anentropic for the suggestion and initial patch, and Łukasz Rekucki for the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30Fixed #14589 -- Corrected a copy-and-paste error introduced in r14395. ↵Russell Keith-Magee
Thanks to Adam McKerlie for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29Fixed #14181 -- Added a template tag and filters to allow localization to be ↵Russell Keith-Magee
disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee
DeprecationWarnings, and removed 1.1 deprecated code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13Fixed #13765 - 'safe' parameter for urlencode filterLuke Plant
Thanks to KyleMac for the suggestion and SmileyChris for the patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@13849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13Fixed #12965 - unordered_list template filter fails when given a ↵Luke Plant
non-iterable second item in a two item list Thanks to grahamu for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10Fixed #14235 - UnicodeDecodeError in CSRF middlewareLuke Plant
Thanks to jbg for the report. This changeset essentially backs out [13698] in favour of a method that sanitizes the token rather than escaping it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-09Patch CSRF-protection system to deal with reported security issue. ↵James Bennett
Announcement and details to follow. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-07Fixed #13475 - for tag raises an exception when trying to unpack a ↵Luke Plant
non-iterable item Thanks to SmileyChris for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13690 bcc190cf-cafb-0310-a4f2-bffc1f526a37