def inject_variables(): user_admin = is_admin(app) return dict(is_admin=user_admin)
def build_app(): build_fedora(app) authenticated() logger(app) is_admin(app)
@app.context_processor def inject_variables(): user_admin = is_admin(app) return dict(is_admin=user_admin) @manager.command def create_database(): """Create all database tables""" create_db(app) @manager.command def drop_database(): """Create all database tables""" drop_db(app) @manager.command def run(): """Run application""" app.run(debug=True, host='0.0.0.0') if __name__ == '__main__': build_app() is_admin(app) manager.run()
def inject_variables(): user_admin = is_admin(app) return dict( is_admin=user_admin)
@app.context_processor def inject_variables(): user_admin = is_admin(app) return dict( is_admin=user_admin) @manager.command def create_database(): """Create all database tables""" create_db(app) @manager.command def drop_database(): """Create all database tables""" drop_db(app) @manager.command def run(): """Run application""" app.run(debug=True, host='0.0.0.0') if __name__ == '__main__': build_app() is_admin(app) manager.run()