Thank you, Anthony. That helps. In my app, things will soon get complex
enough that the pattern-based system will suit me best. With your help, I
think I understand it a bit better now. I got it to work for what I need in
this first test by simply removing '$anything'.
On Wednesday, August 26, 2015 at 11:45:42 AM UTC-4, Anthony wrote:
>
> Your routes.py maps literally *any *URL (including static URLs) to just
> the single /myapp/default/index URL. When using $anything in the first item
> of the tuple, you should also append it to the second so whatever arbitrary
> part of the original URL was matched gets retained. In any case, you
> probably don't want to match /$anything to a specific controller and
> function (at least not as the first rule, as that will match all incoming
> URLs).
>
> If you just want to eliminate the application name for URLs and specify a
> default controller and function, the parameter-based rewrite system is a
> better option.
>
> Anthony
>
> On Wednesday, August 26, 2015 at 11:33:53 AM UTC-4, David Ripplinger wrote:
>>
>> Hi everyone,
>>
>> I know I'm doing something wrong here. I'm trying out app-specific
>> routes.py files. I have an app that currently has the default/index page
>> unmodified, that is, it's equivalent to the welcome app.
>>
>> I have in the web2py base directory the following contents in my
>> routes.py file:
>> routes_app = (
>> ('/$anything', 'myapp'),
>> )
>>
>> I have in the application directory myapp the following contents in my
>> routes.py file:
>> routes_in = (
>> ('/$anything', '/myapp/default/index'),
>> )
>>
>> I just wanted to see if, with these initial rules, I could simply visit
>> the url '/' and get to '/myapp/default/index'. More complex rules will be
>> going in once I have this working. It loads the correct page, but it is
>> entirely unformatted, making me think that somehow the css file didn't get
>> through or something.
>>
>> I don't know if it's significant, but I'm running web2py on localhost
>> with ssl using:
>> web2py.exe -c ssl/server.crt -k ssl/server.key
>>
>> I observed normal behavior with the ssl before introducing the routes.py
>> files.
>>
>> Is there something I'm doing wrong?
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.