[Fixed]-Django – How to access files from view with two forms

1👍

Try:

profile_picture = user_profile_form.cleaned_data['profile_picture']
if profile_picture:
     new_user_profile = UserProfile()
     new_user_profile.user=new_user
     new_user_profile.profile_picture=profile_picture
     new_user_profile.save()

Your are validating your form and you are not taking cleaned_date

I hope that helps..

👤gamer

Leave a comment