TRYTON_CONFIG='../../etc/trytond.conf', # If the application is to be configured in the debug mode DEBUG=False, # Load the template from FileSystem in the path below instead of the # default Tryton loader where templates are loaded from Database TEMPLATE_LOADER_CLASS='nereid.templating.FileSystemLoader', TEMPLATE_SEARCH_PATH='.', # The location where the translations of this template are stored TRANSLATIONS_PATH='i18n', ) # Create a new application app = Nereid(static_folder='%s/static/' % CWD, static_url_path='/static') # Update the configuration with the above config values app.config.update(CONFIG) # Initialise the app, connect to cache and backend app.initialise() # Setup the filesystem cache app.session_interface.session_store = FilesystemSessionStore( '/tmp', session_class=Session) Babel(app) if __name__ == '__main__': app.debug = True
# Cache Memcached Servers # (Only if SESSION_STORE_CLASS or CACHE_TYPE is Memcached) # eg: ['localhost:11211'] #CACHE_MEMCACHED_SERVERS = ['localhost:11211'], #CACHE_MEMCACHED_SERVERS = ['localhost:11211'], # If the application is to be configured in the debug mode DEBUG=False, TEMPLATE_LOADER_CLASS='nereid.templating.FileSystemLoader', TEMPLATE_SEARCH_PATH='%s/templates/' % cwd, TRANSLATIONS_PATH='%s/i18n/' % cwd, ) # Create a new application app = Nereid() app.session_interface.session_store = FilesystemSessionStore( '/tmp', session_class=Session) # Update the configuration with the above config values app.config.update(CONFIG) # Initialise the app, connect to cache and backend app.initialise() babelized_app = Babel(app) application = babelized_app.app.wsgi_app class NereidHostChangeMiddleware(object): """