  def truncatewords(value, arg):
      """
      Truncates a string after a certain number of words
  
      Argument: Number of words to truncate after
      """
      from django.utils.text import truncate_words
      try:
          length = int(arg)
      except ValueError: # invalid literal for int()
 
</s> remove     Argument: Number of words to truncate after
 </s> add     Argument: Number of words to truncate after. </s> remove     Truncates a string after a certain number of words
 </s> add     Truncates a string after a certain number of words. </s> remove     Truncates HTML after a certain number of words
 </s> add     Truncates HTML after a certain number of words. </s> remove     except ValueError: # invalid literal for int()
 </s> add     except ValueError: # Invalid literal for int(). </s> remove     Wraps words at specified line length
 </s> add     Wraps words at specified line length.
    Argument: Number of words to truncate after.
  def truncatewords(value, arg):
      """
      Truncates a string after a certain number of words
  
    Argument: Number of words to truncate after.
      """
      from django.utils.text import truncate_words
      try:
          length = int(arg)
      except ValueError: # invalid literal for int()
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/defaultfilters.py