          # case.
          args[1:2] = ['"%s"' % arg for arg in args[1].split(",")]
  
      if len(args) == 2:
          # {% cycle foo %} case
          name = args[1]
          if not hasattr(parser, '_namedCycleNodes'):
              raise TemplateSyntaxError("No named cycles in template: '%s' is not defined" % name)
          if not name in parser._namedCycleNodes:
              raise TemplateSyntaxError("Named cycle '%s' does not exist" % name)
 
</s> remove             raise TemplateSyntaxError("No named cycles in template: '%s' is not defined" % name)
 </s> add             raise TemplateSyntaxError("No named cycles in template."
                                      " '%s' is not defined" % name) </s> remove     # Note: This returns the exact same node on each {% cycle name %} call; that
    # is, the node object returned from {% cycle a b c as name %} and the one
    # returned from {% cycle name %} are the exact same object.  This shouldn't
    # cause problems (heh), but if it does, now you know.
 </s> add     # Note: This returns the exact same node on each {% cycle name %} call;
    # that is, the node object returned from {% cycle a b c as name %} and the
    # one returned from {% cycle name %} are the exact same object.  This
    # shouldn't cause problems (heh), but if it does, now you know. </s> remove             raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % (taglib, e)
 </s> add             raise TemplateSyntaxError("'%s' is not a valid tag library: %s" %
                                      (taglib, e)) </s> remove         raise TemplateSyntaxError, "%r expected format is 'value as name'" % bits[0]
 </s> add         raise TemplateSyntaxError("%r expected format is 'value as name'" %
                                  bits[0]) </s> remove         raise TemplateSyntaxError, "Invalid templatetag argument: '%s'. Must be one of: %s" % \
            (tag, TemplateTagNode.mapping.keys())
 </s> add         raise TemplateSyntaxError("Invalid templatetag argument: '%s'."
                                  " Must be one of: %s" %
                                  (tag, TemplateTagNode.mapping.keys()))
        # {% cycle foo %} case.
          # case.
          args[1:2] = ['"%s"' % arg for arg in args[1].split(",")]
  
      if len(args) == 2:
        # {% cycle foo %} case.
          name = args[1]
          if not hasattr(parser, '_namedCycleNodes'):
              raise TemplateSyntaxError("No named cycles in template: '%s' is not defined" % name)
          if not name in parser._namedCycleNodes:
              raise TemplateSyntaxError("Named cycle '%s' does not exist" % name)
keep keep keep keep replace keep keep keep keep keep
 Style and import fixes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6641 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/template/defaulttags.py