On Jul 15, 6:57 am, Mike Orr <[email protected]> wrote:
> On Wed, Jul 14, 2010 at 4:01 AM, Low Kian Seong <[email protected]> wrote:
>
>
>
> > Dear all,
>
> > After an upgrade to Pylons 1.0 I have been having this problem loading
> > up my site. It gives me this error which I cannot make head or tail
> > out of :
>
> >  response = self._inspect_call(func)
> > File '/home/lowks/virtualenv/cot/lib/python2.6/site-packages/
> > Mako-0.3.4-py2.6.egg/mako/runtime.py', line 341 in _include_file
> >  callable_(ctx, **_kwargs_for_include(callable_, context._orig,
> > **kwargs))
> > File '/home/lowks/COT_TRUNK_ROOT/nilacl/data/templates/email/
> > form.mako.py', line 44 in render_body
> >  __M_writer(escape(h.secure_form(h.url_for('forgot_password'),
> > method='post')))
> > TypeError: 'module' object is not callable
>
> > Can someone please shed some light ? Thank you.
>
> Hi, I'm the WebHelpers maintainer but I don't know much about
> secure_form, which was written before my time. It did move from
> 'webhelpers.html' to 'webhelpers.pylonslib' in 1.0, to show that it
> depends on Pylons.
>
> The error looks like your import is wrong in helpers.py . You're
> importing the secure_form module, not the secure_form function inside
> it. The correct import for 'h.secure_form()' is:
>
> from webhelpers.pylons.secure_form import secure_form
>
> Or
>
> from webhelpers.pylons.secure_form import *

You are right the location of secure_form is different. If I do those
that you suggested, I end up with this error :

(cot)lo...@lowkster-desktop:~/COT_TRUNK_ROOT$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from webhelpers.pylons.secure_form import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pylons.secure_form


>
> Although the latter may import more than you want.
>
> --
> Mike Orr <[email protected]>

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

Reply via email to