修改主页,感觉还可以
This commit is contained in:
17
blueprint/index_views.py
Normal file
17
blueprint/index_views.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from flask import Blueprint, render_template, url_for, redirect
|
||||
import sqlite3
|
||||
import os
|
||||
|
||||
index_bp = Blueprint('/', __name__)
|
||||
|
||||
@index_bp.route('/')
|
||||
def repage():
|
||||
return redirect(url_for('blog.home'))
|
||||
|
||||
@index_bp.route('/mirrors/')
|
||||
def mirrors():
|
||||
return redirect(url_for('blog.autoindex'))
|
||||
|
||||
@index_bp.route('/greet/<name>/')
|
||||
def greet(name):
|
||||
return f'Hello, {name}!'
|
||||
Reference in New Issue
Block a user