Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #5478 -- Fixed bug in lorem template tag. Thanks, racter

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 59964c2c3fba3a59d43e7514e1478cca46852595 1 parent 4f70820
@adrianholovaty adrianholovaty authored
2  django/contrib/webdesign/templatetags/
@@ -62,6 +62,6 @@ def lorem(parser, token):
count = '1'
count = parser.compile_filter(count)
if len(bits) != 1:
- raise TemplateSyntaxError("Incorrect format for %r tag" % tagname)
+ raise template.TemplateSyntaxError("Incorrect format for %r tag" % tagname)
return LoremNode(count, method, common)
lorem = register.tag(lorem)
4 django/contrib/webdesign/
@@ -7,6 +7,10 @@
>>> paragraphs(1)
['Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.']
+>>> from django.template import loader, Context
+>>> t = loader.get_template_from_string("{% load webdesign %}{% lorem 3 w %}")
+>>> t.render(Context({}))
+u'lorem ipsum dolor'
from django.contrib.webdesign.lorem_ipsum import *

0 comments on commit 59964c2

Please sign in to comment.
Something went wrong with that request. Please try again.