Ticket #5478: webdesign.diff
File webdesign.diff, 1.5 KB (added by , 17 years ago) |
---|
-
django/contrib/webdesign/tests.py
7 7 >>> paragraphs(1) 8 8 ['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.'] 9 9 10 >>> from django.template import loader, Context 11 >>> t = loader.get_template_from_string("{% load webdesign %}{% lorem 3 w %}") 12 >>> t.render(Context({})) 13 u'lorem ipsum dolor' 10 14 """ 11 15 12 16 from django.contrib.webdesign.lorem_ipsum import * -
django/contrib/webdesign/templatetags/webdesign.py
62 62 count = '1' 63 63 count = parser.compile_filter(count) 64 64 if len(bits) != 1: 65 raise TemplateSyntaxError("Incorrect format for %r tag" % tagname)65 raise template.TemplateSyntaxError("Incorrect format for %r tag" % tagname) 66 66 return LoremNode(count, method, common) 67 67 lorem = register.tag(lorem)