That flatten function is not needed. "print page" works just well.

On Wednesday, January 1, 2014 7:59:36 PM UTC-4, askel wrote:
>
> > would add a dependency to a whole template language
>
> I'm afraid, avoiding dependency on some package by baking your own is 
> otherwise called "reinventing the wheel"
>
> > it looks like you have to put templates in a *.b file rather than 
> directly in your Python code. 
>
> Breve language IS a 100% Python so when you write Breve you actually write 
> Python. And of course you don't have to write any *.b file.
>
>     from breve.flatten import flatten
>     from breve.tags.html import tags
>
>     globals().update(tags)
>
>     menu = div(class_='menu') [
>         ul(class_='nav') [(
>             li [a(class_='btn', href=link.url) [link.text]] for link in 
> links
>         )]
>     ]
>
>     page = html [
>         body [
>             menu,
>             div (id='content') [
>                 'Hello World!',
>             ],
>         ],
>     ]
>
>     print flatten(page)
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to