def _create_app(self, config=None): app = Flask(__name__) app.psdash = self app.config.from_envvar('PSDASH_CONFIG', silent=True) if config and isinstance(config, dict): app.config.update(config) # CUSTOM app.config.update( DEBUG=False, SECRET_KEY='\x19&\xbbb1ls\xb4i\xcfg\x1f"%d\x9eF.\xae\x92GH@\r', PSDASH_NODES=[{ 'name': 'mywebnode', 'host': '192.168.28.54', 'port': 5000 }]) self._load_allowed_remote_addresses(app) # If the secret key is not read from the config just set it to something. if not app.secret_key: app.secret_key = 'whatisthissourcery' app.add_template_filter(fromtimestamp) from psdash.web import webapp prefix = app.config.get('PSDASH_URL_PREFIX') if prefix: prefix = '/' + prefix.strip('/') webapp.url_prefix = prefix app.register_blueprint(webapp) return app
def _create_app(self, config=None): app = Flask(__name__) app.psdash = self app.config.from_envvar('PSDASH_CONFIG', silent=True) if config and isinstance(config, dict): app.config.update(config) self._load_allowed_remote_addresses(app) # If the secret key is not read from the config just set it to something. if not app.secret_key: app.secret_key = 'whatisthissourcery' app.add_template_filter(fromtimestamp) from web import webapp prefix = app.config.get('PSDASH_URL_PREFIX') if prefix: prefix = '/' + prefix.strip('/') webapp.url_prefix = prefix app.register_blueprint(webapp) return app
def _create_app(self, config=None): app = Flask(__name__) app.psdash = self app.config.from_envvar('PSDASH_CONFIG', silent=True) if config and isinstance(config, dict): app.config.update(config) if not app.secret_key: app.secret_key = 'whatisthissourcery' app.add_template_filter(fromtimestamp) from psdash.web import webapp prefix = app.config.get('PSDASH_URL_PREFIX') if prefix: prefix = '/' + prefix.strip('/') webapp.url_prefix = prefix app.register_blueprint(webapp) return app
def _create_app(self, config=None): app = Flask(__name__) app.psdash = self app.config.from_envvar('PSDASH_CONFIG', silent=True) if config and isinstance(config, dict): app.config.update(config) self._load_allowed_remote_addresses(app) # If the secret key is not read from the config just set it to something. if not app.secret_key: app.secret_key = 'whatisthissourcery' app.add_template_filter(fromtimestamp) from psdash.web import webapp prefix = app.config.get('PSDASH_URL_PREFIX') if prefix: prefix = '/' + prefix.strip('/') webapp.url_prefix = prefix app.register_blueprint(webapp) return app
def _crea_app(self, config=None): app = Flask(__name__, template_folder="plantillas" ) app.psdash = self app.config.from_envvar('PSDASH_CONFIG', silent=True) if config and isinstance(config, dict): app.config.update(config) self._cargar_direccciones_remotas_permitidas(app) # If the secret key is not read from the config just set it to something. if not app.secret_key: app.secret_key = 'whatisthissourcery' app.add_template_filter(fromtimestamp) from controlador_web import webapp prefix = app.config.get('PSDASH_URL_PREFIX') if prefix: prefix = '/' + prefix.strip('/') webapp.url_prefix = prefix app.register_blueprint(webapp) return app