python 3.x – Django saves records only with default value and not with the value of the form

Good evening, I'm having a big problem with django, no matter what I do, I always save the data that I know as default instead of the data I sent through the form.

models.py

of django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.core.validators import MaxValueValidator, MinValueValidator

# Create your models here.
class Profile (models.Model):
user = models.OneToOneField (User, on_delete = models.CASCADE)
vol = models.IntegerField (default = 0, validators =[MinValueValidator(0), MaxValueValidator(100)])

def __str __ (self):
return self.user.username

@receiver (post_save, sender = User)
def create_user_profile (sender, instance, created, ** kwargs):
if it is created:
Profile.objects.create (user = example)

@receiver (post_save, sender = User)
def save_user_profile (sender, instance, ** kwargs):
instance.profile.save ()

views.py

from django.shortcuts import render, redirect
of .forms import UserForm, ProfileForm
of .models import User, Profile
#adicionar code
def create_profile (request):
userform = UserForm (request.POST or None)
profileform = ProfileForm (request.POST or None)

if userform.is_valid () and profileform.is_valid ():
usk = userform.save ()
profileform.instance.user = User.objects.get (id = usk.pk)
profileform.vol = request.POST.get (& # 39; vol & # 39;)
profileform.save ()
return redirect (& # 39; login & # 39;)

return return (request, & # 39; formprofile.html & # 39 ;, {& # 39; userform & # 39 ;: userform, & # 39; profileform & # 39 ;: profileform})

def delete_profile (request, code):
user = User.objects.get (id = code)
profile = Profile.objects.get (id = code)

if request.method == & # 39; POST & # 39;
user.delete ()
profile.delete ()
return redirect (& # 39; initial & # 39;)

return redirect (& # 39; initial & # 39;) #alter after

def update_profile (request, code):
user = User.objects.get (id = code)
profile = Profile.objects.get (id = code)

userform = UserForm (request.POST or None, instance = user)
profileform = ProfileForm (request.POST or None, instance = profile)
if userform.is_valid () and profileform.is_valid ():
userform.save ()
profileform.save ()
return redirect (& # 39; ger_profile & # 39;)
return return (request, & # 39; formprofile.html & # 39 ;, {& # 39; userform & # 39 ;: userform, & # 39; profileform & # 39 ;: profileform})

def ger_profile (request, code):
user = User.objects.get (id = code)
return return (request, & # 39; gerprofile.html & # 39 ;, {& # 39; user & # 39 ;: user})

forms.py

of django import forms
of .models import Profile, User

class UserForm (forms.ModelForm):
goal:
model = User
fields = [
      "username",
      "password",
      "email",
    ]
    password = forms.CharField (widget = forms.PasswordInput)
widgets = {
& # 39; password & # 39 ;: forms.PasswordInput (),
}

class ProfileForm (forms.ModelForm):
goal:
model = Profile
fields = [
      "vol",
    ]

registration template

{% extends & # 39; basep.html & # 39;%}
{% block content%}
  

Create user account

{% csrf_token%} {{userform.as_p}} {{profileform.as_p}}
{% endblock%}

Basic template:




  
  
  





{% block content%}
{% endblock%}


What I want is simply to set up a registration system, where the user registers beyond his data an audio volume appropriate to what he wants, it is not very complicated, the big problem as he said is in the views.py, which simply does not work correctly no matter what you do, the method create_profile does not save the volume of the POST of the form, it is always the value default, if someone can help me solve this problem, I would appreciate it.

OBS :. Sorry for my Portuguese something wrong, I'm writing this evening in the evening, since I spent most of the night trying to solve this thorn in the side, Thanks someone who can help me.