On 26.8.2011 7:57, Jonathan Lundell wrote:
On Aug 25, 2011, at 9:28 PM, Kenneth Lundström wrote:

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?
> I think that should work. But there aren't corresponding unit tests, so there could be problems. Give it a try, and if it doesn't behave the way you think it should, let me know.

Yes, it works.


Kenneth


Reply via email to