1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

magic-removal: Fixed template unit tests. Corrected expected output for 'spaceless' tests, added extra error condition for cycle tests.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2006-01-17 12:47:12 +00:00
parent 00f93bc7bb
commit c983ab3e16
2 changed files with 4 additions and 2 deletions

View File

@ -344,6 +344,8 @@ def cycle(parser, token):
elif len(args) == 2:
name = args[1]
if not hasattr(parser, '_namedCycleNodes'):
raise TemplateSyntaxError("No named cycles in template: '%s' is not defined" % name)
if not parser._namedCycleNodes.has_key(name):
raise TemplateSyntaxError("Named cycle '%s' does not exist" % name)
return parser._namedCycleNodes[name]