Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42901

Re: can anyone help me in developing a simple webpage in jinja2

Date 2013-04-06 10:15 +0300
From Jan Riechers <janpeterr@freenet.de>
Subject Re: can anyone help me in developing a simple webpage in jinja2
References <e8c498f4-348c-415f-927c-f871551d9a82@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.194.1365232819.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 06.04.2013 01:41, Satabdi Mukherjee wrote:
> i am a rookie in python and i am trying to develop a simple webpage using jinja2.
can anyone please help me how to do that
> i am trying in this way but showing invalid syntax error
>
[...]
>      <ul id="navigation">
>      {% for item in navigation %}
>          <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
>      {% endfor %}
>      </ul>
>
>      <h1>My Webpage</h1>
>      {{ a_variable }}
[...]
>

Hello,

the jinja2 syntax is correct that way, see also this for reference for 
variable naming:
http://jinja.pocoo.org/docs/templates/index.html#variables

The invalid syntax is raised when? Can you post the error a bit more 
detailed, this will help giving you any advice.

If you know the code part raising the error and you post it, this will 
also help.

Jan

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

can anyone help me in developing a simple webpage in jinja2 Satabdi Mukherjee <satamukh@gmail.com> - 2013-04-05 15:41 -0700
  Re: can anyone help me in developing a simple webpage in jinja2 Jan Riechers <janpeterr@freenet.de> - 2013-04-06 10:15 +0300
  Re: can anyone help me in developing a simple webpage in jinja2 Chris Angelico <rosuav@gmail.com> - 2013-04-06 19:00 +1100
  Re: can anyone help me in developing a simple webpage in jinja2 Cousin Stanley <cousinstanley@gmail.com> - 2013-04-07 19:29 +0000

csiph-web