diff --git a/app.py b/app.py index 38523fa..9bdc67e 100644 --- a/app.py +++ b/app.py @@ -12,7 +12,7 @@ db.init_app(app) @app.route('/') def index(): - allUsetrs = User.query.all() + allUsetrs = User.query.order_by(User.FIO).all() s = {} for user in allUsetrs: @@ -30,8 +30,11 @@ def index(): data['kolvo'] = '0' s[user.FIO] = data + + - print(s) + + return render_template('index.html', users = s ) @@ -55,6 +58,7 @@ def useradd(): userAdd = User(FIO=fio, dolgnost=dolgn) db.session.add(userAdd) db.session.commit() + return redirect(url_for('adminpage')) @@ -71,4 +75,4 @@ def addprogul(): if __name__ == '__main__': - app.run(host='0.0.0.0', port='3800', debug=True) + app.run(host='0.0.0.0', port='3800', debug=True) \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index a2ac1fd..07b1230 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -26,12 +26,18 @@ header { background-color: #b4d6c6; border-radius: 12px; box-shadow: 0px 5px 10px 2px rgba(27, 52, 64, 0.3); + +} + +.card-main{ + height: 150px; } .row { margin-top: 20px; + } diff --git a/templates/adminpage.html b/templates/adminpage.html index 4ad6783..caf3e16 100644 --- a/templates/adminpage.html +++ b/templates/adminpage.html @@ -52,21 +52,22 @@

Добавить сотрудника

+
- + - +
diff --git a/templates/index.html b/templates/index.html index 5ce56d8..dd99fcb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,7 +19,7 @@ {% for key, value in users.items() %} -
+

{{key}} @@ -30,19 +30,15 @@
Даты прогулов: {% for i in value['dates'] %} - {{i}}, + {{i}}, {% endfor %} +

- - - - {% endfor %}
- \ No newline at end of file