On Aug 14, 2011, at 3:26 AM, fishwebby wrote:

> I'm struggling with the routing in web2py and I'm hoping someone can
> point me in the right direction (I'm a web2py newbie).
> 
> I want to change this (which works):
> 
> http://127.0.0.1:8000/init/admin_courses/index
> 
> to this:
> 
> http://127.0.0.1:8000/admin/courses

You could probably figure out how to do this eventually using the 
pattern-matching router (the parametric router won't do it for you), but it's 
going to be a lot easier if you start out without the need to rename/split 
controller items.

It's hard to say what would work best without knowing more about the patterns 
you'd see and the controllers and functions you have.

> 
> but I can't get it to work with the various routes.py files. I've
> followed the suggestions here:
> http://wiki.web2py.com/URL_Re_writing
> and here:
> http://www.web2py.com/book/default/chapter/04#URL-Rewrite
> 
> and various others from this forum but I can't get anything other than
> "invalid request".
> 
> I want to do this for various controllers, for example:
> 
> http://127.0.0.1:8000/admin/users
> http://127.0.0.1:8000/admin/users/3/assignments
> 
> (I'm coming from Rails / Symfony / Kohana so perhaps I'm trying to do
> something that isn't the web2py way?)
> 
> If anyone can point me in the right direction it would be greatly
> appreciated!


Reply via email to