On Jan 7, 2011, at 1:56 PM, VP wrote:
>
> Thanks.
> What if I have something like this:
>
> example1.com /app1/controller1
> example1.net /app1/controller2
>
> How would this translate into this new syntax?
Right now it doesn't split an application across domains. If that's useful, I
could extend the syntax. There's an alternative syntax to the one I showed
earlier, where the domain map is defined globally in the BASE router. While
it's not currently a feature, it would look like this:
routers = dict(
BASE = dict(
domains = {
"example1.com" : "app1/controller1",
"example1.net" : "app1/controller2"
},
)
)
>
> Thanks.
>
> On Jan 7, 2:39 pm, Jonathan Lundell <[email protected]> wrote:
>> On Jan 7, 2011, at 12:25 PM, Jonathan Lundell wrote:
>>
>>
>>
>>
>>
>>> On Jan 7, 2011, at 12:14 PM, VP wrote:
>>
>>>> It is something like this:
>>
>>>> example1.com /app1/default
>>>> example2.com /app2/default
>>>> example3.com /app3/default
>>
>>> In that case:
>>
>>> routers = dict(
>>> app1 = dict(domain='example1.com'),
>>> app2 = dict(domain='example2.com'),
>>> app3 = dict(domain='example3.com'),
>>> )
>>
>> By way of a little more explanation: 'default' doesn't appear because
>> 'default' is already the default controller. There's a router named BASE for
>> overrides that apply to all apps, but it's left out here because it's empty.
>> The defaults are shown in router.example.py.