def index(): redirect(URL(r=request,f='byplace'))

or at the bottom of controller

def index():
     request.function='byplace'  # override request
     response.view='clubs/byplace.html' # make sure you map into the
right view
     return byplace() # call the controller you want

Massimo

On Dec 10, 11:21 am, annet <[EMAIL PROTECTED]> wrote:
> In my controllers I do not make use of the index() function, so it
> simply reads:
>
> def index():
>     return dict()
>
> In one of my controllers called clubs I have got three functions:
>
> byplace():
> byactivity():
> byfacility():
>
> In my menu, when the visitor click clubs, the byplace function is
> exposed, so no problems there. However, when the visitor for some
> reason entershttp://../b2c/clubs/in the browser (so the URL without
> the function) I get an invalid function error.
>
> What lines of code do I need to add to the index() function to prevent
> this from happening?
>
> Best regards,
>
> Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to