  
          <img src='bar.gif' height='10' width='{% widthratio this_value max_value 100 %}' />
  
      Above, if ``this_value`` is 175 and ``max_value`` is 200, the the image in
      the above example will be 88 pixels wide (because 175/200 = .875; .875 *
      100 = 87.5 which is rounded up to 88).
      """
      bits = token.contents.split()
      if len(bits) != 4:
          raise TemplateSyntaxError("widthratio takes three arguments")
      tag, this_value_expr, max_value_expr, max_width = bits
 
</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, "'for' statements should have at least four words: %s" % token.contents
 </s> add         raise TemplateSyntaxError("'for' statements should have at least four"
                                  " words: %s" % token.contents) </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]) </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, "second argument to 'regroup' tag must be 'by'"
 </s> add         raise TemplateSyntaxError("second argument to 'regroup' tag must be 'by'")
    the above example will be 88 pixels wide (because 175/200 = .875;
    .875 * 100 = 87.5 which is rounded up to 88).
  
          <img src='bar.gif' height='10' width='{% widthratio this_value max_value 100 %}' />
  
      Above, if ``this_value`` is 175 and ``max_value`` is 200, the the image in
    the above example will be 88 pixels wide (because 175/200 = .875;
    .875 * 100 = 87.5 which is rounded up to 88).
    the above example will be 88 pixels wide (because 175/200 = .875;
    .875 * 100 = 87.5 which is rounded up to 88).
      """
      bits = token.contents.split()
      if len(bits) != 4:
          raise TemplateSyntaxError("widthratio takes three arguments")
      tag, this_value_expr, max_value_expr, max_width = bits
keep keep keep keep replace 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