PyCharm grand repo wide reformat

This commit is contained in:
Xevion
2020-03-08 20:21:18 -05:00
parent 6aeb41249c
commit 66c2ff228c
17 changed files with 277 additions and 187 deletions

View File

@@ -1,27 +1,35 @@
from app import app
from flask import send_from_directory, redirect, url_for, render_template
import mistune
import os
import mistune
from flask import send_from_directory, redirect, url_for, render_template
from app import app
markdown = mistune.Markdown()
@app.route('/keybase.txt')
def keybase():
return app.send_static_file('keybase.txt')
@app.route('/modpacks')
def modpacks():
return markdown(open(os.path.join(app.root_path, 'static', 'MODPACKS.MD'), 'r').read())
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico',
mimetype='image/vnd.microsoft.icon')
@app.errorhandler(401)
def unauthorized(e):
return redirect(url_for('login'))
@app.errorhandler(404)
def page_not_found(e):
# note that we set the 404 status explicitly
return render_template('error.html', code=404, message='Content not found...'), 404
return render_template('error.html', code=404, message='Content not found...'), 404