-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_front.py
More file actions
32 lines (24 loc) · 927 Bytes
/
Copy pathmain_front.py
File metadata and controls
32 lines (24 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from flask import Flask, url_for, request, render_template, redirect, flash
from flask_wtf import FlaskForm
from sqll import *
from request import *
from wtforms import IntegerField, SubmitField
from wtforms.validators import DataRequired
init_database()
dates = get_all_dates()
for date in dates:
save_day(chickity(date))
app = Flask(__name__)
app.config['SECRET_KEY'] = 'predpof_code_crusaders'
@app.route('/', methods=['GET'])
def first():
return render_template('sigma.html', style=url_for('static', filename='css/css_for_reg.css'))
@app.route('/all_days', methods=['POST'])
def reg():
date = request.form['zxc']
context = get_day(date)
print(context)
print(context[date])
return render_template('all_days.html', style=url_for('static', filename='css/css_for_reg.css'), context=context)
if __name__ == '__main__':
app.run(port=8888, host='127.0.0.1')