Aha! Thanks, I was reading the tutorial from the routes site, I did
not know that these functions were imported as h
from routes import url_for
import firstapp.lib.helpers as h # in base.py
On May 6, 2:25 am, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote:
> It's "h.url_for", not "map.url_for".
>
> Best Regards,
> -jj
>
> On 5/5/07, voltron <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Thanks. here is the code I used:
>
> > map.connect('tada', '', controller='test', action='tada')
> > map.url_for('tada')
>
> > I am using EasyEclipse wth PyDev on windows
>
> > On May 5, 9:05 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> > > On Sat, May 05, 2007 at 12:01:13PM -0700, voltron wrote:
> > > > on trying out some of the tutorials from the routes site, I noticed
> > > > the use of the url_for function crashes the paster server:
>
> > > > AttributeError: 'Mapper' object has no attribute 'url_for'
>
> > > Do you have example code that results in this error?
>
> > > > How does one use this function in Pylons?
>
> > > Usually you use it through the Webhelpers module. E.g.:
>
> > > h.url_for(controller='news', action='today')
>
> > > > Is it all all necessary?
>
> > > Let's say it's useful. You can use h.url_for(action='foo') which creates
> > > a link to the current controller but to a different controller. I love
> > > it. :)
>
> > > Christoph...
>
> --http://jjinux.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---