Edgewall Software

Opened 15 years ago

Last modified 8 years ago

#377 new defect

TextTemplate should be an alias for NewTextTemplate

Reported by: Eric Owned by: cmlenz
Priority: major Milestone: 0.9
Component: Template processing Version: 0.5.1
Keywords: loop, for Cc:

Description

In the following script, the template engine does not recognize server variable:

tmpl = TextTemplate("""
{% for server in servers %}
   ${server}
{% end %}""")

stream = tmpl.generate(servers=['server.example.com',])
self.assertEquals(stream.render().strip(),
                  'server.example.com')

Change History (2)

comment:1 Changed 15 years ago by cboos

  • Milestone set to 0.7
  • Summary changed from bug with for ... end expression to TextTemplate should be an alias for NewTextTemplate

Use NewTextTemplate, TextTemplate is still an alias for OldTextTemplate at this point (Genshi 0.5 and 0.6).

However the doc says:

while TextTemplate is still an alias for the old language at this point, that will change in a future release. But also note that the old syntax may be dropped entirely in a future release. legacy text template syntax

There's no ticket yet for this AFAICT, so I'm retargeting this one to that end.

comment:2 Changed 8 years ago by hodgestar

  • Milestone changed from 0.7 to 0.9

Moved to milestone 0.9.

Note: See TracTickets for help on using tickets.