#!/usr/bin/env python import sys, os sys.path.append(os.getcwd() + "/../models") sys.path.append(os.getcwd() + "/../configs/static") import web import product import GeoipTable, localies, GlobalFunctions, TranslationsTable LANG = TranslationsTable.getLanguage() urls = ( "/product", product.app_product, "/(.*)", "index" ) app = web.application(urls, locals()) session = web.session.Session(app, web.session.HTStore('ses'),initializer = {'test': 'wooSESSIONS VALUEFOR TESTt', 'foo':''}) def session_hook(): web.ctx.session = session web.template.Template.globals['session'] = session app.add_processor(web.loadhook(session_hook))