remove user routes, no need

main
lza_menace 3 years ago
parent f88636c958
commit a38706a357

@ -45,13 +45,12 @@ def create_app():
with app.app_context(): with app.app_context():
from tubbymemes import filters 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 from tubbymemes.cli import mod, cli
app.register_blueprint(filters.bp) app.register_blueprint(filters.bp)
app.register_blueprint(api.bp) app.register_blueprint(api.bp)
app.register_blueprint(meme.bp) app.register_blueprint(meme.bp)
app.register_blueprint(meta.bp) app.register_blueprint(meta.bp)
app.register_blueprint(user.bp)
app.register_blueprint(mod.bp) app.register_blueprint(mod.bp)
app.register_blueprint(cli.bp) app.register_blueprint(cli.bp)
return app return app

@ -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/<handle>')
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)
Loading…
Cancel
Save