I'm definitely confused with this routing scheme.

There's the base routes.py (which is usually ignored due to file
name). Inside this file there are 3 examples (routes_app, routes_in
and routes_out). So, assuming you change the name of the file
routes.py and restart your server, it will use routes_app (and will it
ignore routes_in and _out?). If I comment out routes_app in that file,
I should be picking up my patterns_in and patterns_out, but how would
it then know the top level (app) routing? Also, I've seen docs refer
to app-specific routing, what does that mean? A routes.py inside the
app root folder? Thanks in advance for your answers.



On Tue, Mar 20, 2012 at 10:36 AM, Jonathan Lundell <[email protected]> wrote:
> On Mar 20, 2012, at 7:22 AM, rdodev wrote:
>
> Alright, I need some assistance in this regard. So, after I managed web2py
> to pick up the routes.py, it simply won't work (not even with the provided
> examples in that file). I keep getting "Bad Request" response even for the
> "welcome" app. Not sure what patterns is the router expecting. Again, any
> assistance is much appreciated.
>
> Below are the URLs I've tried:
>
> http://localhost:8080/welcome/default/index (Bad Request)
> http://localhost:8080/welcome/default (Bad Request)
> http://localhost:8080/welcome/ (Bad Request)
>
> url_ins
>
>               (r'/(?P<app>welcome|admin|app)\b.*', r'\g<app>'),
>               (r'(.*)', r'myapp'),
>               (r'/?(.*)', r'myapp')
>
>
> You've copied the example for routes_app; you should follow the example for
> routes_in.
>
>
>
>
> On Friday, March 16, 2012 4:57:48 PM UTC-4, rdodev wrote:
>>
>> Hey all,
>>
>> I have renamed (and edited) routes.py for both incoming and outgoing urls.
>> I have tried messing up with the url tuples and it looks as if web2py is
>> just not picking that up at all. I have restarted web2py server, I have
>> tried changed in the controllers (and does changes are picked up), byt no
>> matter what I do to routes.py it just doesn't work (as in, web2py doesn't
>> seem to be picking it up). Thanks in advance for your help.
>>
>
>

Reply via email to