Help on updating profile pic, username and email in a modelform

I need help on updating my profile pic, username and email in my User and Profile model

this is what is shown when the page is first accessed

When i try to change and save any of the fields, after i pressed update ,the screen just shows the first image again without changing any of the value, i’ve checked in the admin panel that only the successfully updated msg pops up in the panel and none of the values are changed.
This is my user_details in my users.views.py

@login_required(login_url="/users/login/")
def user_details(request):
    if request.method == 'POST':
        form1 = ProfileUpdateForm(request.POST, instance=request.user)
        form2 = UserUpdateForm(request.POST,
                                request.FILES,
                                instance=request.user.profile)
        if form1.is_valid() and form2.is_valid():
                form1.save()
                form2.save()
                messages.success(request, f'Your account has been updated!')
                return redirect("../userdetail/")
    else:
        form1 = UserUpdateForm(instance=request.user)
        form2 = ProfileUpdateForm(instance=request.user.profile)

    return render(request, 'users/userdetails.html', {"form":form1,
                                                      "form2":form2
                                                      },)

This is my template , userdetails.html `

<div class="content-section">
      <div class="media">
        <img class="details-pfp" src="{{ user.profile.image.url }}">
        <div class="media-body">
          <h2 class="account-heading">Username: {{ user.username }}</h2>
          <p class="text-secondary">Email:{{ user.email }}</p>
        </div>
      </div>
    </div>
    <form class="form-with-validation" method="POST" action="/users/userdetail/" enctype="multipart/form-data">
          {% csrf_token %}
          {{ form}}
          {{ form2 }}
          <div class="form-group">
              <button class="form-submit" type="submit">Update</button>
          </div>
          
      </form>

This is my users.models.py

from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    image = models.ImageField(default='default.jpg',upload_to='profile_pics') 
    def __str__(self):
        return f'{self.user.username} Profile'

This is my forms.py

from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile

class UserRegisterForm(UserCreationForm):
    email = forms.EmailField()
    
    class Meta:
        model = User
        fields = ['username', 'email', 'password1', 'password2']


class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username','email']

class ProfileUpdateForm(forms.ModelForm):
    class Meta:
        model = Profile
        fields = ['image']

nvm its solved i just reversed the forms below first if statement in views.py

def user_details(request):
    if request.method == 'POST':
        form1 = UserUpdateForm(request.POST, instance=request.user)
        form2 = ProfileUpdateForm(request.POST,
                                request.FILES,
                                instance=request.user.profile)
        if form1.is_valid() and form2.is_valid():
                print("this is a test")
                form1.save()
                form2.save()
                messages.success(request, f'Your account has been updated!')
                return redirect("../userdetail/")
    else:
        form1 = UserUpdateForm(instance=request.user)
        form2 = ProfileUpdateForm(instance=request.user.profile)

    return render(request, 'users/userdetails.html', {"form":form1,
                                                      "form2":form2
                                                      },)

Welcome @FieryLow !

First, this code you posted here is identical to the code in your original post. I see no difference between the two, other than the addition of a print statement.

Second, one underlying problem you have here is that you are not using the prefix attribute on either form.

Whenever you have more than one Django form within an HTML form, you need to use the prefix attribute on all (but one) of the forms.