PS: BASE is '' by default in recent routes.example.py distribution.

Il giorno martedì 21 maggio 2013 13:49:04 UTC+2, Massimo Di Pierro ha 
scritto:
>
> Hello Julia,
> you have lines like
> (BASE + '/admin', '/admin/default/index'),
> what is the value of BASE?
>
>
> On Monday, 20 May 2013 19:48:16 UTC-5, Júlia Rizza wrote:
>>
>> So I have this on my *routes.py*:
>>
>> routers = dict(
>>     BASE = dict(
>>         default_application = 'kolaborativa',
>>         default_controller = 'default',
>>         default_function = 'index'
>>         ),
>>     )
>>
>> routes_in = (
>>     # do not reroute admin unless you want to disable it
>>     (BASE + '/admin', '/admin/default/index'),
>>     (BASE + '/admin/$anything', '/admin/$anything'),
>>     # do not reroute appadmin unless you want to disable it
>>     (BASE + '/$app/appadmin', '/$app/appadmin/index'),
>>     (BASE + '/$app/appadmin/$anything', '/$app/appadmin/$anything'),
>>     # do not reroute static files
>>     (BASE + '/$app/static/$anything', '/$app/static/$anything'),
>>     # reroute favicon and robots, use exable for lack of better choice
>>     ('/favicon.ico', '/examples/static/favicon.ico'),
>>     ('/robots.txt', '/examples/static/robots.txt'),
>>     # do other stuff
>>     ((r'.*http://otherdomain.com.* (?P<any>.*)', r'/app/ctr\g<any>')),
>>     # remove the BASE prefix
>>     ('/$username', BASE + 'user_info/$username'),
>> )
>>
>> routes_out = (
>>     # do not reroute admin unless you want to disable it
>>     ('/admin/$anything', BASE + '/admin/$anything'),
>>     # do not reroute appadmin unless you want to disable it
>>     ('/$app/appadmin/$anything', BASE + '/$app/appadmin/$anything'),
>>     # do not reroute static files
>>     ('/$app/static/$anything', BASE + '/$app/static/$anything'),
>>     # do other stuff
>>     (r'.*http://otherdomain.com.* /app/ctr(?P<any>.*)', r'\g<any>'),
>>     (r'/app(?P<any>.*)', r'\g<any>'),
>>     # restore the BASE prefix
>>     (BASE + 'user_info/$username', '/$username'),
>> )
>>
>> This way I still need to access* http://localhost:8000/user_info/username
>> * to see the user profile and I want to access just *
>> http://localhost:8000/username*.
>> Can someone help me?
>>
>>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to