views:

634

answers:

4

I installed Pylons 0.9.7 using the go-pylons.py script.
I have a line of python:

from webhelpers.html.secure_form import secure_form

When I try to serve my application I get the error: no module secure_form.

I've tried writing import webhelpers.html.tags and other modules from webhelpers and those work. I'm wondering why I don't have secure_form and how I can obtain this module manually? I've tried re-running go-pylons.py and it didn't help.

Any ideas?

+1  A: 

ugh, so for some reason I have 1.0b4 of webhelpers installed and the path to secure_form changed... (http://groups.google.com/group/pylons-discuss/msg/695d73b831a4aee3) I guess my question now becomes: how do I install a previous version of webhelpers? I have easy_install

tom
easy_install "webhelpers==1.0b4"
number5
+5  A: 

if your webhelpers version is 1.0b4 or above, secure_form is under webhelpers.pylonslib, ie.

from webhelpers.pylonslib import secure_form
number5
A: 

I just ran into this as well.

In case the other posts aren't obvious to get the old version of webhelpers you can run:

easy_install webhelpers==0.6.4
greg
A: 

Actually looking at this, I got something similar and the proper tested line of import is:

from webhelpers.pylonslib.secure_form import secure_form

Low Kian Seong