mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Move APIs to their own folder
This commit is contained in:
parent
789441e636
commit
60e7078e13
13 changed files with 325 additions and 295 deletions
|
@ -15,8 +15,9 @@ from werkzeug.security import generate_password_hash
|
|||
from onlylegs.extensions import db, migrate, login_manager, assets, compress, cache
|
||||
from onlylegs.config import INSTANCE_DIR, MIGRATIONS_DIR
|
||||
from onlylegs.models import User
|
||||
from onlylegs.views import index, image, group, settings, profile
|
||||
from onlylegs import api, auth
|
||||
from onlylegs.views import index as view_index, image as view_image, group as view_group, settings as view_settings, profile as view_profile
|
||||
from onlylegs.api import media as api_media, group as api_group, account as api_account
|
||||
from onlylegs import auth as view_auth
|
||||
from onlylegs import gwagwa
|
||||
|
||||
|
||||
|
@ -107,13 +108,17 @@ def create_app(): # pylint: disable=R0914
|
|||
assets.register("styles", styles)
|
||||
|
||||
# BLUEPRINTS
|
||||
app.register_blueprint(auth.blueprint)
|
||||
app.register_blueprint(api.blueprint)
|
||||
app.register_blueprint(index.blueprint)
|
||||
app.register_blueprint(image.blueprint)
|
||||
app.register_blueprint(group.blueprint)
|
||||
app.register_blueprint(profile.blueprint)
|
||||
app.register_blueprint(settings.blueprint)
|
||||
app.register_blueprint(view_auth.blueprint)
|
||||
app.register_blueprint(view_index.blueprint)
|
||||
app.register_blueprint(view_image.blueprint)
|
||||
app.register_blueprint(view_group.blueprint)
|
||||
app.register_blueprint(view_profile.blueprint)
|
||||
app.register_blueprint(view_settings.blueprint)
|
||||
|
||||
# APIS
|
||||
app.register_blueprint(api_media.blueprint)
|
||||
app.register_blueprint(api_group.blueprint)
|
||||
app.register_blueprint(api_account.blueprint)
|
||||
|
||||
# CACHE AND COMPRESS
|
||||
cache.init_app(app)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue