Hi TurboGears users!  Forwarding a request from the Pylons list for
more documentation on using Genshi with Pylons and TG2.


---------- Forwarded message ----------
From: Mike Orr <[EMAIL PROTECTED]>
Date: Feb 6, 2008 12:38 PM
Subject: Re: Form filling with Genshi
To: [EMAIL PROTECTED]


On Feb 6, 2008 11:24 AM, Philip Cooper <[EMAIL PROTECTED]> wrote:
>
>
>
> On Feb 4, 9:34 am, Geoff <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > What can I use to fill in forms when using Genshi in Pylons? htmlfill
> > is mentioned a lot, but I can't find any examples of how to use it
> > from Pylons. Seems Genshi also has it's own form filler but again, I
> > can't find any examples of how to use this in Pylons (if it's
> > possible).
>
> OK I waited a couple of days to see if someone else would post the
> right way to do this.  Not much so I'll offer up how I do it  (that is
> a warning!)

I think we need a Genshi Task Force to beef up the Pylons/Genshi docs.
   I tried to use Genshi in an application but couldn't find simple
solutions for things like:

    - Setting the page title/breadcrumbs/javascript for the site
template from the controller or page template.  Match templates are
hard to understand, and you're in a dilemma whether to "really" output
the value in the site template or page template, because in some cases
one makes more sense and in some the other.

    - Having to wrap values in genshi.XML() in disparate parts of the
app to prevent them from being escaped later, which ties the
controller/library code too closely to a particular template engine.

    - Form handling.

I wanted to use Genshi for its input validation and smart escaping,
but when I asked a couple Pylons/Genshi questions on the Genshi list
and didn't get a response for a couple days, I switched to Mako
because the manual is much more complete, Pylons developers have a lot
of experience with it, and you get answers on the mailing list
remarkably quickly.  Genshi or the Pylons/Genshi users need to do this
if they want to see its adoption rate among Pylons users increase.

--
Mike Orr <[EMAIL PROTECTED]>

Pawel Stradomsky:
> What exactly prevents you from wrapping them with Markup() in the template
itself?

Mike Orr:
Well, it defeats the purpose of Markup by making the decision at the
point of display rather than the point of origin, which knows more
about what the data is and whether it's been preformatted.

Iain Duncan:
> Might be worth cross posting that to the TG list
because there is a lot of Genshi/Tosca discussion on there as well and I
imagine the crossover will increase with TG2

> Many of
us are experimenting with the pylons/genshi combo as we pave the way to
TG2.

So if there's any Genshi expert who would like to take a crack at
this, it belongs in the Cookbook section of the Pylons wiki.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to