Can't render form fields on profile page so that I can update profile image

Form code:

class PFPform(ModelForm):
    class Meta:
        model = User
        fields = ['profile_pic' , 'username']

I added username to check/debug

View code:

def signed_in_view(request):
form = PFPform()
return render(request, "hobbies/signed_in.html", {
    "title": "Signed In Page",
    "h1": "Signed In Page",
})

Where form is called on html template.

  <form method = "POST" action ="" enctype="multipart/form-data">
          {%csrf_token%}
          {{ form }}
          <input class = "btn btn-primary" type = "submit">
  </form>

You forgot to add "form": form in you views render section

Back to Top