You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
986 B

#! /usr/bin/python3
# -*- coding:utf-8 -*-
import bottle as b
import os
from . import CURRENT_DIR
app = b.Bottle()
@app.route('/')
def index():
return b.static_file('index.html', os.path.join(CURRENT_DIR, "templates"))
@app.route('/update', method='POST')
def update():
b.abort(403, "禁止修改中奖用户名单")
@app.route('/revoke', method='POST')
def revoke():
pass
@app.route('/users')
def users():
pass
@app.route('/lucky_users')
def lucky_users():
if b.request.method == 'POST':
pass
else:
pass
@app.route('/luckless_users')
def luckless_users():
pass
@app.route('/awards')
def awards():
pass
@app.route('/reset')
def reset():
pass
@app.route('/static/<filepath:path>')
def callback(filepath):
return b.static_file(filepath, os.path.join(CURRENT_DIR, "static"))
def run(host, port, debug):
app.run(host=host, port=port, debug=debug)
if __name__ == '__main__':
run('localhost', 8080, True)