Add password change functionality and profile image upload

- Add profile_image field to Profile model with default value
- Update profile edit route to handle profile image file uploads
- Add password change route with validation in auth module
- Create change password template with form
- Update profile template to include image upload with preview
- Add password change link to admin sidebar
- Update homepage to use dynamic profile image from database
This commit is contained in:
Claude
2025-11-13 15:58:51 +00:00
parent 425e66a473
commit 6845308a34
8 changed files with 143 additions and 5 deletions

View File

@@ -53,6 +53,7 @@ class Profile(db.Model):
description_2 = db.Column(db.Text)
years_experience = db.Column(db.Integer, default=7)
cv_url = db.Column(db.String(500))
profile_image = db.Column(db.String(500), default='img/personal.webp')
created_at = db.Column(db.DateTime, default=datetime.utcnow)
updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
@@ -64,7 +65,8 @@ class Profile(db.Model):
'description_1': self.description_1,
'description_2': self.description_2,
'years_experience': self.years_experience,
'cv_url': self.cv_url
'cv_url': self.cv_url,
'profile_image': self.profile_image
}