Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

example not working #9

Open
opensourcegeek opened this issue Feb 28, 2014 · 1 comment
Open

example not working #9

opensourcegeek opened this issue Feb 28, 2014 · 1 comment

Comments

@opensourcegeek
Copy link

The example from the main page isn't working - not sure if i'm doing something wrong.

from quik import Template

temp = Template("""

""")

users = [
{'username': 'foo', 'url': 'http://...', 'age': 25},
{'username': 'bar', 'url': 'https://...', 'age': 18}]

print temp.render(locals())

/usr/local/bin/python quik_template_test.py
Traceback (most recent call last):
File "/Users/opensourcegeek/PycharmProjects/jsf_robot_case_generator/tests/py/quik_template_test.py", line 18, in
print temp.render(users)
File "/usr/local/lib/python2.7/site-packages/quik.py", line 27, in render
self.merge_to(namespace, output, loader)
File "/usr/local/lib/python2.7/site-packages/quik.py", line 37, in merge_to
self.ensure_compiled()
File "/usr/local/lib/python2.7/site-packages/quik.py", line 32, in ensure_compiled
self.root_element = TemplateBody(self.content)
File "/usr/local/lib/python2.7/site-packages/quik.py", line 157, in init
self.parse()
File "/usr/local/lib/python2.7/site-packages/quik.py", line 941, in parse
raise self.syntax_error('block element')
quik.TemplateSyntaxError: line 7, column 5: expected block element in template body, got: #end

...
@avelino
Copy link
Owner

avelino commented Feb 28, 2014

error on if syntax, open issue #7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants