On Sep 13, 4:08 pm, "[email protected]" <[email protected]> wrote:
> i am complete newb with chameleon (downloaded 30 minutes ago) and am
> having a problem with basic use.
>
> based on the docs,
> http://chameleon.repoze.org/docs/latest/library.html#getting-started
> i do (in python 2.7.1)
>
> >>> from chameleon import PageTemplate
> >>> template = PageTemplate("<div>Hello, $name.</div>")
> >>> template(name='John')
>
> u'<div>Hello, $name.</div>'
>
> why does not the template variable get substituted?
Answering my own question, it should be of course,
template = PageTemplate("<div>Hello, ${name}.</div>")
Apparently the curly brackets got nuked in the documentation.
Sorry for not reading further before posting.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.