[web2py] Re: How to handle multiple domains with the same application

2013-07-16 Thread Marcio Andrey Oliveira
Derek is right. He explained exactly what I want (sorry my bad English). Massimo, thanks for the solution. I started studying web2py these days and it seems the right tool for the work. Thank all. On Sunday, July 14, 2013 8:22:31 PM UTC-3, Marcio Andrey Oliveira wrote: > > Hi. > > Currently I

[web2py] Re: How to handle multiple domains with the same application

2013-07-15 Thread Massimo Di Pierro
That's even easier In the model: if request.env.host_name == 'mydomain.com' uri = 'mydomain.com.sqlite' css = URL('static','mydomain.com/style.css') elif: # etc etc pass db = DAL(uri) response.files.append(css) On Monday, 15 July 2013 14:41:49 UTC-5, Derek wrote: > > I th

[web2py] Re: How to handle multiple domains with the same application

2013-07-15 Thread Derek
I think he wanted different domains, but the same app. each domain would have it's own stylesheet... perhaps you could just use the same database. then you setup multitenancy, but that's not quite what you want, since you might have one game on all three sites, one game on only two sites, and o

[web2py] Re: How to handle multiple domains with the same application

2013-07-15 Thread Massimo Di Pierro
Yes. For example I have this in my routes.py file: routes_in=[ ('^.*:https?://(www.)?fermiqcd.com:\w+ /','/fermiqcd'), ('^.*:https?://(www.)?experts4solutions.com:\w+ /','/e4s'), ('^.*:https?://evote.experts4solutions.com:\w+ /','/evote'), ('^.*:https?://(www.)?ptolincoln.org:\w+ /