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 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 one game on one specific site > only... > > On Monday, July 15, 2013 1:43:37 AM UTC-7, Massimo Di Pierro wrote: >> >> 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+ /','/pto'), >> ('^.*:https://(.*)election.name:\w+ /','/evote'), >> ('/','/examples/default/index'), >> ('/robots.txt','/examples/static/robots.txt'), >> ('/favicon.ico','/examples/static/favicon.ico')] >> >> It tells how to map paths (for each domain) into which web2py application. >> >> >> >> On Sunday, 14 July 2013 18:22:31 UTC-5, Marcio Andrey Oliveira wrote: >>> >>> Hi. >>> >>> Currently I have 3 arcade sites: 1 with all kinds of games, 1 with only >>> girls games and another one with only escaping games. >>> >>> Each site is running in a separated script, and worst than that is that >>> I have some games in girls game site and on escaping games sites that exist >>> on general arcade site. It means I'm expending database and disk space with >>> duplicated date. >>> >>> I want to make one application that will receive requests from all >>> domains and according to the domain, it will show a different look and feel >>> with its respective games. >>> >>> How do I do it in web2py? I mean, how do I handle resources based in the >>> domain user typed in browser? >>> >>> Regards. >>> >> -- --- 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.