diff --git a/app.py b/app.py index dc9db06..a19b3f4 100644 --- a/app.py +++ b/app.py @@ -9,7 +9,6 @@ import pandas as pd import base64 from random import randint from dotenv import load_dotenv -from pprint import pprint load_dotenv() app = Flask(__name__) @@ -97,7 +96,6 @@ def manageProcess(fCommand, fData): "category": i, "class_id": classes[i] } - print("got class") homerooms = cateData['Homerooms'] currDate = "" confirmed = [] @@ -272,7 +270,7 @@ def group_teach_publish(): cclass = {} for i in classes: cclass = { - "name": db.child("Classes").child(i).child( + "name": db.child("Classes").child("GP_Class").child(i).child( "Class").child(classes[i]).child("name").get().val(), "category": i, "class_id": classes[i], @@ -306,6 +304,8 @@ def group_teach_publish(): h = h.split('^') db.child("Homerooms").child(h[0]).child(h[1]).child( "Absent").child(date).child(period).child("signature").update({cclass['class_id']: str(storage.child(os.path.join('signatures', rand)).get_url(None))}) + db.child("Homerooms").child(h[0]).child(h[1]).child( + "Absent").child(date).child(period).child("names").child(cclass['class_id']).set(cclass['name']) currPeriodData = db.child("Homerooms").child(h[0]).child(h[1]).child( "Absent").child(date).child(period).get().val() if 'notes' in currPeriodData: diff --git a/requirements.txt b/requirements.txt index a38c6ca..b0db49f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,19 +1,19 @@ # Automatically generated by https://github.com/damnever/pigar. -# Attendance/app.py: 1 +# Attendance/app.py: 2 Flask == 2.0.1 -# Attendance/app.py: 2 +# Attendance/app.py: 3 # Attendance/test.py: 1 Pyrebase == 3.0.27 -# Attendance/app.py: 7 +# Attendance/app.py: 8 pandas == 1.1.3 -# Attendance/app.py: 10 +# Attendance/app.py: 11 # Attendance/test.py: 3 python_dotenv == 0.19.0 -# Attendance/app.py: 4 +# Attendance/app.py: 5 pytz == 2020.1 gunicorn == 20.1.0 \ No newline at end of file diff --git a/templates/admin.html b/templates/admin.html index 5d7cc24..992b129 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -141,7 +141,8 @@ {% if absData[currDate][periods[c-1]]['name'] == 'GP' %} {% if 'signature' in absData[currDate][periods[c-1]] %} {% for i in absData[currDate][periods[c-1]]['signature'] %} -