[solved] formulator not reproducing its own results
Do you know what the python-equivalent of atoi() is? I have an idea...
[...]
I don't think it's this way around. I think formulator is fine dealing with integers, but Zope interferes with strings... So i need to atoi()...
Ha, got it! atoi() aka int() it was. If I convert the request/form/field_actitle to an integer like so: actitle python:int(request.field_actitle) the whole thing works like a charm. Score!!!! I used to have actitle request/form/field_actitle|nothing but postfixing |nothing to the python script above produces an error. Do you know how I can do the equivalent? I tried python:test(request.has_key('field_actitle'), field_actitle, nothing) but then, when field_actitile is missing, Zope complains about the unresolved name. -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html get my key here: http://madduck.net/me/gpg/publickey i wish this wish not to be granted! -- achilles (hofstadter's geb) ----- End forwarded message ----- -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html get my key here: http://madduck.net/me/gpg/publickey the reason the mainstream is thought of as a stream is because it is so shallow.
Getting there. try this: actitle python:int(request.field_actitle) or None; Troy martin f krafft wrote:
Do you know what the python-equivalent of atoi() is? I have an idea...
[...]
I don't think it's this way around. I think formulator is fine dealing with integers, but Zope interferes with strings... So i need to atoi()...
Ha, got it! atoi() aka int() it was. If I convert the request/form/field_actitle to an integer like so:
actitle python:int(request.field_actitle)
the whole thing works like a charm.
Score!!!!
I used to have
actitle request/form/field_actitle|nothing
but postfixing |nothing to the python script above produces an error. Do you know how I can do the equivalent?
I tried
python:test(request.has_key('field_actitle'), field_actitle, nothing)
but then, when field_actitile is missing, Zope complains about the unresolved name.
participants (2)
-
martin f krafft -
Troy Farrell