# 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 app.run('0.0.0.0')
app.initialise() app.jinja_env.globals.update({"json": json, "sample": random.sample}) babelized_app = Babel(app) application = babelized_app.app.wsgi_app # application = Sentry( # application, Client('http://sjkdhsadjkwi423y8wkjhwuiy@localhost:9000/7') # ) # If the file is launched from the CLI then launch the app using the debug # web server built into werkzeug if __name__ == "__main__": class NereidTestMiddleware(object): def __init__(self, app, site): self.app = app self.site = site def __call__(self, environ, start_response): environ["HTTP_HOST"] = self.site return self.app(environ, start_response) site = "localhost:5000" app.wsgi_app = NereidTestMiddleware(app.wsgi_app, site) app.debug = True app.static_folder = "%s/static" % (cwd,) app.session_interface.session_store = FilesystemSessionStore("/tmp", session_class=Session) app.run("0.0.0.0")
app.config.update(CONFIG) app.initialise() app.jinja_env.globals.update({'json': json, 'sample': random.sample}) babelized_app = Babel(app) application = babelized_app.app.wsgi_app application = Sentry( application, Client('http://*****:*****@sentry.openlabs.co.in/10') ) # If the file is launched from the CLI then launch the app using the debug # web server built into werkzeug if __name__ == '__main__': class NereidTestMiddleware(object): def __init__(self, app, site): self.app = app self.site = site def __call__(self, environ, start_response): environ['HTTP_HOST'] = self.site return self.app(environ, start_response) site = 'my.openlabs.co.in:5000' app.wsgi_app = NereidTestMiddleware(app.wsgi_app, site) app.debug = False app.static_folder = '%s/static' % (cwd,) app.session_interface.session_store = \ FilesystemSessionStore('/tmp', session_class=Session) app.run('0.0.0.0')
from nereid import Nereid from trytond.config import CONFIG CONFIG.update_etc('/home/umangarora/trytond.conf') app = Nereid() app.config.update({ 'DATABASE_NAME': 'tul2014', 'SECRET_KEY': 'somekey', }) app.initialise() if __name__ == '__main__': app.debug = True app.run()