Commit Graph

221 Commits

Author SHA1 Message Date
Malcolm Tredinnick 466b90c788 Fixed #1647 -- Included slightly more information in template syntax error
displays in DebugNodeList.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19 12:32:32 +00:00
Malcolm Tredinnick f8a277bc7f Fixed a small typo in the wordwrap filter's docstring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-15 11:47:09 +00:00
Malcolm Tredinnick 927d87d732 Fixed #2320 -- corrected numerous errors in the custom tag examples in
python_templates.txt. Also fixed an argument parsing error for such tags.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-10 10:48:08 +00:00
Adrian Holovaty df4331f3e9 Fixed #2303 -- Fixed bug in [3269] with regard to True and False special-casing in template system
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-07 22:20:07 +00:00
Russell Keith-Magee 5ac919b711 Refs #2202 -- Cleaned up technique of splitting arguments, based upon a suggestion from SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 06:31:26 +00:00
Russell Keith-Magee b9d9351e85 Fixes #2202 -- Added ability to customize output of pluralize filter to handle irregular cases (walrus/walruses, cherry/cherries). Thanks to gid for the suggestion and the initial patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 06:18:39 +00:00
Russell Keith-Magee 4d29cae467 Refs #1400 -- Variable resolver now converts literal strings 'False' and 'True' into booleans when used as template arguments. This is point 2 from ticket #1400. Thanks Kieren Holland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 03:44:56 +00:00
Russell Keith-Magee 6b383afd39 Fixes #1338, Refs #1400, #2237 -- Modified variable resolution to allow template 'if' statements to work if TEMPLATE_STRING_IF_INVALID is set. Modified unit tests to force the use of this variable, so that returning '' isn't confused with an actual failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 03:21:44 +00:00
Malcolm Tredinnick 239adf83d3 Fixed #2053 -- added an optional comparison argument to the "timesince" filter.
Added a "timeuntil" filter that works analogously. Thanks, john@sneeu.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 06:56:08 +00:00
Adrian Holovaty 6b730e1e92 Fixed #2102 -- Template system 'for' loops now support generators. Thanks, dbm-django@mclachlan.com.au
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 03:58:16 +00:00
Malcolm Tredinnick 75a8a32f86 Fixed #2181 -- allow '{' and '}' to be escaped via {% templatetag ... %}.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-18 04:12:55 +00:00
Malcolm Tredinnick bff39bfb8c Fixed #2127 -- Made datetime filters fail silently when passed empty strings or
None. Thanks, Gary Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-11 00:33:44 +00:00
Adrian Holovaty 2abfd5dd58 Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 05:00:13 +00:00
Adrian Holovaty 5edd1335b2 Added django.template.Token.split_contents() and used it to add support for strings with spaces in {% ifchanged %}
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 04:29:10 +00:00
Adrian Holovaty e5cd46d6d1 Fixed #2026 -- Added support for 'and' in template 'if' tags, added dozens of unit tests and updated docs. Thanks, ckknight
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 03:33:21 +00:00
Adrian Holovaty b78b1b98ff Small improvement to django.template.resolve_variable -- isdigit() instead of 0123456789
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 04:12:39 +00:00
Luke Plant 9b86db9bf2 Eliminated lots of mutable default arguments (since they are bugs
waiting to happen and are memory leaks too).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 13:37:34 +00:00
Adrian Holovaty c643e12faf Fixed #1321 -- Made DJANGO_SETTINGS_MODULE optional. You can now call django.conf.settings.configure() to set settings manually if you don't have a settings module. Thanks, Malcolm Tredinnick, Luke Plant, Fredrik Lundh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-16 21:28:06 +00:00
Adrian Holovaty 55c9e98d86 Fixed #1852 -- Improved TemplateSyntaxError to display the original exception if str() of the exception raises an exception in itself. Thanks, nnorwitz@google.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-15 04:24:48 +00:00
Adrian Holovaty 51f6a9442c Fixed #1849 -- Slugifying now collapses consecutive hyphens to a single hyphen. Thanks, Tom Insam
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-15 04:20:04 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00