On 26.8.2011 5:21, Jonathan Lundell wrote:
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote:
I'd like to have three types of routings:
a) web2py.main_domain.com defaults to init, but you can choose the
application with web2py.main_domain.com
b) testing.main_domain.com leads to application: testing
c) development.main_domain.com leads to application: testing,
controller:ticket and function: create_new
is this possible?
Not quite. The parametric router will come close, with something like this in
the BASE router:
default_application = "init",
domains = { "testing.main_domain.com" : "testing",
"development.main_domain.com" : "testing/ticket",
},
...I think, but it does not yet support per-controller default functions.
Thanks Jonathan and Anthony.
So to get as near as possible at the moment I could do:
"development.main_domain.com" : "testing/ticket_create_new",
then create a new controller called ticket_create_new with a index function
that does what my testing/ticket/create_new would have done?
Kenneth
I have a patch for per-controller default functions in the works, but it's not
quite ready.