Armin Ronacher schrieb:
> Hi,
> 
> Kent Tenney wrote:
>> Ubuntu 8.10
>> 
>> after an update I'm getting the following
>> writing output... README Exception occurred:
>>   File 
>> "/home/ktenney/work/virtualenv/lib/python2.5/site-packages/Jinja2-2.1.1-py2.5-linux-i686.egg/jinja2/environment.py",
>> line 357, in parse
>>     raise e
>> TemplateSyntaxError: expected token 'lparen', got 'block_end'
>>   File "/home/ktenney/work/docubi/.templates/layout.html", line 7
>>     {%- macro relbar %}
> In Jinja2 the parentheses are required:
> 
>    {%- macro relbar() %}
> 
> That does the trick.

I think I should say a word or two about this:  We've decided to switch to
Jinja 2 now because Jinja 1 won't be maintained for much longer.

As said in the changelog, there aren't many syntactical changes, on of them
being the one above -- macro definitions requiring an argument.  Jinja2 is
also a bit stricter for undefined variables -- accessing an attribute on
an undefined name raises, so you'll have to change e.g.

{% if foo.bar %}

into

{% if foo and foo.bar %}

if the name "foo" is possibly undefined.

If anyone encounters a problem while switching to Jinja2, please ask here,
and we'll resolve it!

cheers,
Georg

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to