Hi people
I need an help for a litle big trouble with Genshi rendering.
In other words, an apparent simple task it's now a big trouble for me.
I must display or not something according with a variable contained in
the dict. The variable is a simple boolean value Treu or False. Here
the various passages (the interested var is collapsed):
__Javascript__
...
$.ajax( { url: URL,
type: "POST",
data: "collapsed=True",
complete: function( html )
...
...
$.ajax( { url: URL,
type: "POST",
data: "collapsed=False",
complete: function( html )
...
__root.py__ (controller)
@expose( 'newweb.templates.navigator' )
def collapsed_navigator( self, collapsed ):
"""Return the collapsed menu"""
now = datetime.datetime.now()
dataora = now.strftime( "%d-%m-%Y %H:%M" )
return dict( collapsed=collapsed, dataora=dataora, user='Admin' )
__navigator,html__ (template)
<xi:include href="navigator_new.html" />
${navigator_new_collapsed()}
${collapsed}
<py:if test="collapsed">D</py:if>
Well, indifferently to the value (True or False) that cintroller take
(I've inserted a print collapsed statement in the controller) the
application will print the D (only as test, really he must use one of
the two defined functions).
Cab somebody help me? I've tried in every mode, with
choose/when/otherwise, with statement as <py:if test="collapsed ==
True">D</py:if> a so on.
Thank's a lot
Greetings
JOKER Ltd.
--
Mr. Gandhi, cosa ne pensa della civiltà occidentale? - Sarebbe
un'ottima idea! ( intervista al Mahatma Gandhi )
--
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.