37 lines
646 B
Python
37 lines
646 B
Python
from flask import Flask, render_template
|
|
|
|
app = Flask(__name__)
|
|
from influxdb import InfluxDBClient
|
|
|
|
def db_main(host='localhost', port=8086):
|
|
user = 'root'
|
|
password = 'root'
|
|
dbname = 'gas'
|
|
|
|
@app.route('/success')
|
|
def success():
|
|
return "Form success!"
|
|
|
|
@app.route('/', methods=['GET', 'POST'])
|
|
def main_page():
|
|
return render_template('index.html')
|
|
|
|
@app.route('/add_time')
|
|
def add_time():
|
|
return 'admin'
|
|
|
|
@app.route('/admin')
|
|
def admin_index():
|
|
return 'admin'
|
|
|
|
@app.route('/login')
|
|
def login():
|
|
pass
|
|
|
|
@app.route('/logout')
|
|
def logout():
|
|
pass
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True, host='0.0.0.0')
|