Add User
Logic:
Extract required fields (username, password, full name, birthday) from the POST request.
Extract optional fields (email, avatar) using
request.form.get
.Hash the plain text password into an SHA-1 string and save it in the JSON.
Write the new data to the JSON file.
Frontend:
Four mandatory fields: username (for login), password, full name, birthday (not currently used).
Optional email field (used for email notifications).
Avatar selection: choose from six avatars, replace files in
static/icons
with appropriately named PNG files (avatar1.png
,avatar2.png
, etc.) if you want different ones.
Last updated