Move static routes into a blueprint

and update templates

Routes:
* /help
* /rules
* /xmlns/nyaa
* /about (commented out)
This commit is contained in:
Kfir Hadas
2017-07-11 00:13:19 +03:00
parent 7e16616a5d
commit 911fbc317f
6 changed files with 45 additions and 29 deletions

5
nyaa/views/__init__.py Normal file
View File

@@ -0,0 +1,5 @@
from nyaa.views import (
site,
)
site_bp = site.bp

23
nyaa/views/site.py Normal file
View File

@@ -0,0 +1,23 @@
import flask
bp = flask.Blueprint('site', __name__)
# @bp.route('/about', methods=['GET'])
# def about():
# return flask.render_template('about.html')
@bp.route('/rules', methods=['GET'])
def rules():
return flask.render_template('rules.html')
@bp.route('/help', methods=['GET'])
def help():
return flask.render_template('help.html')
@bp.route('/xmlns/nyaa', methods=['GET'])
def xmlns_nyaa():
return flask.render_template('xmlns.html')