Thanks Alberto,
I've already got the patch from ticket 1355 installed, but actually removing
the ET's from the sitetemplate fixed the problem. So simple and I couldn't
find it :-(
Since I'm not using any turbogears widgets (yet :-) ), I doubt I'll have
problems (and if I guess I'll just have to redo the widgets with TW)
Uwe
On Monday 20 August 2007, Alberto Valverde wrote:
> On Aug 20, 2007, at 8:36 PM, Uwe C. Schroeder wrote:
> > Hi everyone,
> >
> > I've been pondering this one for a while and figured either I'm
> > missing
> > something or nobody uses toscawidgets/twTinyMCE with TG.
> >
> > I'm doing something very basic and simple:
> > I declare a form which aside of some text input fields also has a
> > TinyMCE
> > field. This is done with ToscaWidgets and Genshi, not tgwidgets and
> > kid.
> >
> > Whenever I try to render the page, Genshi throws an error in ET:
> > File "/usr/lib/python2.4/site-packages/Genshi-0.4.2-py2.4.egg/
> > genshi/input.py",
> > line 43, in ET
> > tag_name = QName(element.tag.lstrip('{'))
> > AttributeError: 'Stream' object has no attribute 'tag'
> >
> > Turns out, this is the JSLink that is injected by twTinyMCE.
> > ToscaWidgets are
> > internally ET'd to display them properly (not as quoted html).
> >
> > Did anyone encounter this? I get the same error when I try to use
> > any other
> > ToscaWidgets-based javascript widget (i.e. the calendar date picker)
> >
> > Any pointers would be greatly appreciated. I just don't want to
> > patch genshi's
> > ET function since that makes upgrades complicated.
>
> Don't use ET to wrap JSLinks, CSSLinks, etc... when using TW since
> they already take care of adapting their output depending on where
> they're being displayed if used properly. Your sitetemplate.html
> template should look something like this one [1].
>
> However, not using ET will prevent you from using tg "native" widgets
> which require js or css resources since these need ET to be displayed
> properly. If you absolutely need to use them you could try using the
> last patch at this ticket [2] which will most probably be applied
> into 1.1 (maybe even 1.0.X?) to make the migration to Genshi less
> painful to tg widgets users. Please report back if this works out for
> you.
>
> HTH,
>
> Alberto
>
> [1] http://tinyurl.com/2cs8c6
> [2] http://trac.turbogears.org/ticket/1355
>
>
--
UC
--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---