DeeMcCart / CI_PP5_Jeweller

Jewellery website for CI Project 5
0 stars 2 forks source link

Task:/ Issue: User Profile - profile picture not updating #45

Closed DeeMcCart closed 6 months ago

DeeMcCart commented 6 months ago

EPIC: #6

Assumptions or Pre-Requisites:

Acceptance Criteria: (Must be completed before task is moved to 'Done')

Tasks

DeeMcCart commented 6 months ago

DMcC 06/02/24: Solution:

Ref: https://www.youtube.com/watch?v=_P_-gum7rio codemy.com 'Uploading a user profile picture' Key was add ....enctype="multipart/form-data" within the form and, in the profiles/views.py: add ....request.FILES or None ie: profile_form = UserProfileForm(request.POST, request.FILES or None, instance=current_profile)

Note - this has alerted me that we should really have a full user form for maintaining user including firstname and lastname (and possibly user address)

DMcC 09/02/24: Applied CustomClearableFileInput widget to improve UX:

DeeMcCart commented 6 months ago

Profile page with image:

Image

Change the image file and click on Update Information:

Image

Confirmation the image has updated:

Image

DeeMcCart commented 6 months ago

DMcC 09/02/24 - improved UX using CustomClearableFileInput django widget:

Image