      if len(firstbits) != 4:
          raise TemplateSyntaxError, "'regroup' tag takes five arguments"
      target = parser.compile_filter(firstbits[1])
      if firstbits[2] != 'by':
          raise TemplateSyntaxError, "second argument to 'regroup' tag must be 'by'"
      lastbits_reversed = firstbits[3][::-1].split(None, 2)
      if lastbits_reversed[1][::-1] != 'as':
          raise TemplateSyntaxError, "next-to-last argument to 'regroup' tag must be 'as'"
  
      expression = parser.compile_filter(lastbits_reversed[2][::-1])
 
</s> remove         raise TemplateSyntaxError, "next-to-last argument to 'regroup' tag must be 'as'"
 </s> add         raise TemplateSyntaxError("next-to-last argument to 'regroup' tag must"
                                  " be 'as'") </s> remove         raise TemplateSyntaxError, "'ssi' tag takes one argument: the path to the file to be included"
 </s> add         raise TemplateSyntaxError("'ssi' tag takes one argument: the path to"
                                  " the file to be included") </s> remove             raise TemplateSyntaxError, "Second (optional) argument to %s tag must be 'parsed'" % bits[0]
 </s> add             raise TemplateSyntaxError("Second (optional) argument to %s tag"
                                      " must be 'parsed'" % 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())) </s> remove         raise TemplateSyntaxError, "'%s' takes at least one argument (path to a view)" % bits[0]
 </s> add         raise TemplateSyntaxError("'%s' takes at least one argument"
                                  " (path to a view)" % bits[0])
        raise TemplateSyntaxError("second argument to 'regroup' tag must be 'by'")
      if len(firstbits) != 4:
          raise TemplateSyntaxError, "'regroup' tag takes five arguments"
      target = parser.compile_filter(firstbits[1])
      if firstbits[2] != 'by':
        raise TemplateSyntaxError("second argument to 'regroup' tag must be 'by'")
      lastbits_reversed = firstbits[3][::-1].split(None, 2)
      if lastbits_reversed[1][::-1] != 'as':
          raise TemplateSyntaxError, "next-to-last argument to 'regroup' tag must be 'as'"
  
      expression = parser.compile_filter(lastbits_reversed[2][::-1])
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