mirror of
https://github.com/ProjectSynthoria/SynthoriaArchive.git
synced 2025-03-12 15:26:56 +02:00
25 lines
873 B
Python
25 lines
873 B
Python
from nyaa import api_handler, app, template_utils, views
|
|
|
|
DEBUG_API = False
|
|
|
|
|
|
# #################################### BLUEPRINTS ####################################
|
|
|
|
def register_blueprints(flask_app):
|
|
""" Register the blueprints using the flask_app object """
|
|
|
|
# Template filters and globals
|
|
flask_app.register_blueprint(template_utils.bp)
|
|
# API routes
|
|
flask_app.register_blueprint(api_handler.api_blueprint, url_prefix='/api')
|
|
# Site routes
|
|
flask_app.register_blueprint(views.account_bp)
|
|
flask_app.register_blueprint(views.admin_bp)
|
|
flask_app.register_blueprint(views.main_bp)
|
|
flask_app.register_blueprint(views.site_bp)
|
|
flask_app.register_blueprint(views.torrents_bp)
|
|
flask_app.register_blueprint(views.users_bp)
|
|
|
|
|
|
# When done, this can be moved to nyaa/__init__.py instead of importing this file
|
|
register_blueprints(app)
|