diff options
-rw-r--r-- | taskapp/views/user.py | 2 | ||||
-rw-r--r-- | templates/user/edit_profile.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/taskapp/views/user.py b/taskapp/views/user.py index a3af9ff..7581f35 100644 --- a/taskapp/views/user.py +++ b/taskapp/views/user.py @@ -74,7 +74,7 @@ def edit_my_profile(request): if request.user.is_authenticated() == True: profile = Profile.objects.get(user = request.user) data = request.POST#form.cleaned_data - properties = {'aboutme':data['aboutme'], 'foss_comm':data['foss_comm'], 'phonenum':data['phonenum'], 'homepage':data['homepage'], 'street':data['street'], 'city':data['city'], 'country':data['country'], 'nick':data['nick']} + properties = {'aboutme':data['aboutme'], 'foss_comm':data['foss_comm'], 'phonenum':data['phonenum'], 'homepage':data['homepage'], 'street':data['street'], 'city':data['city'], 'country':data['country'], 'nick':data['nick'],'photo':request.FILES['photo']} #fields = ['dob','gender','credits','aboutme','foss_comm','phonenum','homepage','street','city','country','nick'] updateProfile(profile,properties) return redirect('/user/view/uid='+str(profile.user_id)) diff --git a/templates/user/edit_profile.html b/templates/user/edit_profile.html index c7f5aff..43501ac 100644 --- a/templates/user/edit_profile.html +++ b/templates/user/edit_profile.html @@ -1,6 +1,6 @@ {% extends 'base.html' %} {% block content %} - <form action="/user/edit/" method="post"> + <form action="/user/edit/" enctype = "multipart/form-data" method="post"> {{ edit_profile_form.as_p }} <input type="submit" value="Apply Changes" /> </form> |