mk wrote:
> >          ${h.link_to('FrontPage', h.url_for(action="index",
> > title="FrontPage"))}
> >          | ${h.link_to('Edit ' + c.title, h.url_for(title=c.title,
> > action='edit'))}
>
> P.S. I get "AttributeError: 'module' object has no attribute 'link_to'"
>
>
> Regards,
> mk

I think that what gets imported into helpers automatically changed
dramatically between 0.9.6 and 0.9.7 IIRC.

if you open up ./your project/lib/helpers.py you will likely see that
there's nothing in there but comments

Here's mine and as you can see, I like the url_for and the redirect_to
thus my last 2 lines will import them from routes which is where they
reside now, thus making them available....


"""Helper functions

Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to both as 'h'.
"""
# Import helpers as desired, or define your own, ie:
# from webhelpers.html.tags import checkbox, password
from routes import url_for
from routes import redirect_to





--~--~---------~--~----~------------~-------~--~----~
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