Answer the question
In order to leave comments, you need to log in
How to update profile photo without using form?
I'm getting an image from an input and I want to update my profile photo in my views. How can I do this without using form, working exactly on the Profile object?
def profile_form(request):
if request.method == 'POST':
profile = Profile.objects.get(user=request.user)
...
profile.save()
return HttpResponseRedirect("/")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question