That was indeed easy. Thanks!
On Tue, Jul 29, 2014 at 3:31 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > very easy: > > if request.env.host_name == 'domain1': db_uri='sqlite://domain1.db' > elif request.env.host_name == 'domain2': db_uri='sqlite://domain2.db' > else: raise HTTP(404) > > db = DAL(db_uri) > > On Tuesday, 29 July 2014 07:23:03 UTC-5, Ruud Schroen wrote: >> >> Hi list, >> >> I'm working on a portal where people can look for healthcare in a given >> municipality. >> >> Imagine if each municipality has it's own portal, for example: >> >> leudal.zorgloketlimburg.nl >> maas.zorgloketlimburg.nl >> >> What would be the most efficient way to fetch a different database for >> different subdomains? >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/2O1rf-_yTOA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.