Spaces:
Sleeping
Sleeping
rameshmoorthy
commited on
Commit
•
3231217
1
Parent(s):
fdf8e03
Update register.py
Browse files- register.py +5 -5
register.py
CHANGED
@@ -18,17 +18,17 @@ def register():
|
|
18 |
|
19 |
if picture:
|
20 |
form = st.form("Register")
|
21 |
-
name = form.text_input("
|
22 |
min_date = datetime.datetime(1900, 1, 1)
|
23 |
max_date = datetime.datetime.today()
|
24 |
-
dob = form.date_input("
|
25 |
-
city = form.text_input("
|
26 |
submit = form.form_submit_button("submit")
|
27 |
if submit:
|
28 |
if not name or not dob or not city:
|
29 |
-
st.error("Please enter your name, DOB and
|
30 |
else:
|
31 |
-
st.success("registered successfully")
|
32 |
user_id = insert_user_detail(city, dob, name)
|
33 |
know_user_dir = "./known_user/"
|
34 |
image.save_image(picture, know_user_dir, str(user_id))
|
|
|
18 |
|
19 |
if picture:
|
20 |
form = st.form("Register")
|
21 |
+
name = form.text_input("Student name")
|
22 |
min_date = datetime.datetime(1900, 1, 1)
|
23 |
max_date = datetime.datetime.today()
|
24 |
+
dob = form.date_input("Date of Birth ", min_value=min_date, max_value=max_date)
|
25 |
+
city = form.text_input("Class")
|
26 |
submit = form.form_submit_button("submit")
|
27 |
if submit:
|
28 |
if not name or not dob or not city:
|
29 |
+
st.error("Please enter your name, DOB and class")
|
30 |
else:
|
31 |
+
st.success("Student registered successfully")
|
32 |
user_id = insert_user_detail(city, dob, name)
|
33 |
know_user_dir = "./known_user/"
|
34 |
image.save_image(picture, know_user_dir, str(user_id))
|