mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-18 01:09:03 +00:00
Move static routes into a blueprint
and update templates Routes: * /help * /rules * /xmlns/nyaa * /about (commented out)
This commit is contained in:
5
nyaa/views/__init__.py
Normal file
5
nyaa/views/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from nyaa.views import (
|
||||
site,
|
||||
)
|
||||
|
||||
site_bp = site.bp
|
||||
23
nyaa/views/site.py
Normal file
23
nyaa/views/site.py
Normal 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')
|
||||
Reference in New Issue
Block a user