diff --git a/app/__init__.py b/app/__init__.py index b70fbf35..09c78f2a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,4 +1,4 @@ -# from apifairy import APIFairy +from apifairy import APIFairy from config import Config from docker import DockerClient from flask import Flask @@ -6,7 +6,7 @@ from flask_apscheduler import APScheduler from flask_assets import Environment from flask_login import LoginManager from flask_mail import Mail -# from flask_marshmallow import Marshmallow +from flask_marshmallow import Marshmallow from flask_migrate import Migrate from flask_paranoid import Paranoid from flask_socketio import SocketIO @@ -14,7 +14,7 @@ from flask_sqlalchemy import SQLAlchemy from flask_hashids import Hashids -# apifairy = APIFairy() +apifairy = APIFairy() assets = Environment() db = SQLAlchemy() docker_client = DockerClient() @@ -22,7 +22,7 @@ hashids = Hashids() login = LoginManager() login.login_view = 'auth.login' login.login_message = 'Please log in to access this page.' -# ma = Marshmallow() +ma = Marshmallow() mail = Mail() migrate = Migrate(compare_type=True) paranoid = Paranoid() @@ -45,12 +45,12 @@ def create_app(config: Config = Config) -> Flask: registry=app.config['NOPAQUE_DOCKER_REGISTRY'] ) - # apifairy.init_app(app) + apifairy.init_app(app) assets.init_app(app) db.init_app(app) hashids.init_app(app) login.init_app(app) - # ma.init_app(app) + ma.init_app(app) mail.init_app(app) migrate.init_app(app, db) paranoid.init_app(app) @@ -63,8 +63,8 @@ def create_app(config: Config = Config) -> Flask: from .admin import bp as admin_blueprint app.register_blueprint(admin_blueprint, url_prefix='/admin') - # from .api import bp as api_blueprint - # app.register_blueprint(api_blueprint, url_prefix='/api') + from .api import bp as api_blueprint + app.register_blueprint(api_blueprint, url_prefix='/api') from .auth import bp as auth_blueprint app.register_blueprint(auth_blueprint) diff --git a/app/templates/_base/sidenav.html.j2 b/app/templates/_base/sidenav.html.j2 index c5dedec0..784f1ab0 100644 --- a/app/templates/_base/sidenav.html.j2 +++ b/app/templates/_base/sidenav.html.j2 @@ -11,11 +11,11 @@ {# general items #} - {# {% if current_user.can('USE_API') %} + {% if current_user.can('USE_API') %}