Thanks.
On May 28, 12:03 pm, Hala <[email protected]> wrote: > Here is the code to print a certain record to match a subdomain or > print all -- in case someone asks: > > try: > appname = request.env.http_host.split('.')[0] > app_id = db(db.app.name > ==str.lower(appname)).select().first().id > apps=db(db.app.id==app_id).select() > return dict(apps=apps) > > except: > apps=db().select(db.app.ALL,orderby=db.app.name) > return dict(apps=apps)

