Hi Luke,
On Aug 16, 10:30 pm, Luke Stanley <
luke.stan...@gmail.com> wrote:
> Have you thought about using more simple syntax?
> Seeing unusual elements like "<<" in the examples is unappealing.
Well, like in your example below, you can use "functional" html
generation `h.div(h.a(…))` if this syntax feels more natural to you.
> and may I suggest supporting HTML elements as functions already
> directly imported to the namespace?
>
> E.g: Div(A(P('click here'),href='static/link.htm'))
> vs: html.Div(html.A(html.P('click here'),href='static/link.htm'))
In order to find specific parts of Nagare (the sessions manager, the
callbacks manager …), the tag factories can't be simple global
function but must be methods of a renderer object. So they can't
directly be imported.
We usually shorten this syntax overhead by calling the renderer
parameter `h` instead of `html`.
> and just use Class for class (uppercase first letters?)
`class_` is a convention from the PEP8 standard:
"""
- single_trailing_underscore_: used by convention to avoid conflicts
with
Python keyword, e.g.
Tkinter.Toplevel(master, class_='ClassName')
"""
followed by several html generation modules. See for example Breve
(
http://breve.twisty-industries.com/documentation)
> Just some thoughts.
>
> Best regards,
>
> --Luke Stanley
Best regards,
Alain