From a38706a35709860eab0cbd29a30162993ff6666a Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 10 Mar 2022 21:55:27 -0800 Subject: [PATCH] remove user routes, no need --- tubbymemes/factory.py | 3 +-- tubbymemes/routes/user.py | 15 --------------- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 tubbymemes/routes/user.py diff --git a/tubbymemes/factory.py b/tubbymemes/factory.py index fb3e82c..14a7698 100644 --- a/tubbymemes/factory.py +++ b/tubbymemes/factory.py @@ -45,13 +45,12 @@ def create_app(): with app.app_context(): from tubbymemes import filters - from tubbymemes.routes import api, meme, meta, user + from tubbymemes.routes import api, meme, meta from tubbymemes.cli import mod, cli app.register_blueprint(filters.bp) app.register_blueprint(api.bp) app.register_blueprint(meme.bp) app.register_blueprint(meta.bp) - app.register_blueprint(user.bp) app.register_blueprint(mod.bp) app.register_blueprint(cli.bp) return app diff --git a/tubbymemes/routes/user.py b/tubbymemes/routes/user.py deleted file mode 100644 index 38168e9..0000000 --- a/tubbymemes/routes/user.py +++ /dev/null @@ -1,15 +0,0 @@ -from flask import Blueprint, render_template -from flask import redirect, url_for - -from tubbymemes.models import User - - -bp = Blueprint('user', 'user') - - -@bp.route('/user/') -def show(handle): - user = User.query.filter(User.handle == handle).first() - if not user: - return redirect(url_for('meme.index')) - return render_template('profile.html', user=user)