def initialize_context(): web.ctx.site = create_site() context.load() context.error = None context.stylesheets = [] context.javascripts = [] context.user = web.ctx.site.get_user() context.site = config.site context.path = web.ctx.path i = web.input(_method='GET', rescue="false") context.rescue_mode = (i.rescue.lower() == 'true')
def fakeload(): from infogami.core import db #web.load() app.load(dict(REQUEST_METHOD="GET", PATH_INFO="/install")) web.ctx.ip = None context.load() context.error = None context.stylesheets = [] context.javascripts = [] context.site = config.site context.path = '/' # hack to disable permissions web.ctx.disable_permisson_check = True context.user = None web.ctx.site = create_site()