diff --git a/app/__init__.py b/app/__init__.py index 7542bd0..d7a415a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -197,14 +197,12 @@ def create_app(): cache.init_app(app) - from app.routes.app import bp as app_bp from app.routes.topics import bp as topics_bp from app.routes.threads import bp as threads_bp from app.routes.users import bp as users_bp from app.routes.guides import bp as guides_bp from app.routes.mod import bp as mod_bp from app.routes.posts import bp as posts_bp - app.register_blueprint(app_bp) app.register_blueprint(topics_bp) app.register_blueprint(threads_bp) app.register_blueprint(users_bp) @@ -328,6 +326,11 @@ def create_app(): return {'error': 'forbidden'}, e.code else: return render_template('common/403.html'), e.code + + @app.get('/') + def index(): + return redirect(url_for('topics.all_topics')) + # # @app.errorhandler(413) # def _handle_413(e): diff --git a/app/routes/app.py b/app/routes/app.py deleted file mode 100644 index b2aabdf..0000000 --- a/app/routes/app.py +++ /dev/null @@ -1,6 +0,0 @@ -from flask import Blueprint, redirect, url_for, render_template -bp = Blueprint('app', __name__, url_prefix = '/') - -@bp.get('/') -def index(): - return redirect(url_for('topics.all_topics'))