Hi all,
I want to add a snippet in the "Template Tricks" section, but the rendered
result does not contain the block of python code and the html+jinja code.
--------------------------------------------------
#!python
import markdown
from flask import Markup
#!html+jinja
{{ message }}
--------------------------------------------------
What's my error ?
Thanks
Regards,
Stéphane
Try this:
{{{
#!python
print "Hello World!"
}}}
{{{
#!html+jinja
{{ message }}
}}}
Regards,
Peter
On Tue, May 25, 2010 at 5:09 PM, Stephane Wirtel <stephane@wirtel.be> wrote:
> Hi all,
>
> I want to add a snippet in the "Template Tricks" section, but the rendered
> result does not contain the block of python code and the html+jinja code.
>
> --------------------------------------------------
> #!python
>
> import markdown
> from flask import Markup
>
> #!html+jinja
>
> {{ message }}
> --------------------------------------------------
>
> What's my error ?
>
> Thanks
>
> Regards,
> Stéphane
>
>
--
Peter Ward
http://flowblok.id.au/
Bachelor of Computer Science and Technology II
University of Sydney
Thanks :-) On 05/25/2010 09:30 AM, Peter Ward wrote: > Try this: > {{{ > #!python > > print "Hello World!" > }}} > > {{{ > #!html+jinja > > {{ message }} > }}} > > Regards, > Peter > > On Tue, May 25, 2010 at 5:09 PM, Stephane Wirtel <stephane@wirtel.be> wrote: > >> Hi all, >> >> I want to add a snippet in the "Template Tricks" section, but the rendered >> result does not contain the block of python code and the html+jinja code. >> >> -------------------------------------------------- >> #!python >> >> import markdown >> from flask import Markup >> >> #!html+jinja >> >> {{ message }} >> -------------------------------------------------- >> >> What's my error ? >> >> Thanks >> >> Regards, >> Stéphane >> >> > >
Thank you for your help. The new snippet: http://flask.pocoo.org/snippets/19/ Regards, Stéphane On 05/25/2010 09:51 AM, Stephane Wirtel wrote: > Thanks :-) > On 05/25/2010 09:30 AM, Peter Ward wrote: >> Try this: >> {{{ >> #!python >> >> print "Hello World!" >> }}} >> >> {{{ >> #!html+jinja >> >> {{ message }} >> }}} >> >> Regards, >> Peter >> >> On Tue, May 25, 2010 at 5:09 PM, Stephane Wirtel <stephane@wirtel.be> wrote: >> >>> Hi all, >>> >>> I want to add a snippet in the "Template Tricks" section, but the rendered >>> result does not contain the block of python code and the html+jinja code. >>> >>> -------------------------------------------------- >>> #!python >>> >>> import markdown >>> from flask import Markup >>> >>> #!html+jinja >>> >>> {{ message }} >>> -------------------------------------------------- >>> >>> What's my error ? >>> >>> Thanks >>> >>> Regards, >>> Stéphane >>> >>> >> >> >