Подскажите пж в чем проблема (
def signupp(request):
if request.method == 'POST':
user = User.objects.create_user(username=request.POST['name'], password=request.POST['pin'])
number = request.POST['number']
fname = request.POST['fname']
lname = request.POST['lname']
address = request.POST['address']
birtday = request.POST['birtday']
passport = request.POST['passport']
number_pass = request.POST['number_pass']
body_pass = request.POST['body_pass']
file = request.POST['file']
role = request.POST['role']
new = Register(number=number,fname=fname,lname=lname,address=address,birtday=birtday,passport=passport,number_pass=number_pass,
body_pass=body_pass,file=file,role=role)
new.save()
print('saved')
auth.login(request, user)
return HttpResponse("Signed Up")
else:
return render(request, 'registration/registration.html')
<form action="{% url 'sign' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="text" name="number">
<input type="text" name="fname">
<input type="text" name="name">
<input type="text" name="lname">
<input type="text" name="address">
<input type="date" name="birtday">
<input type="text" name="passport">
<input type="text" name="number_pass">
<input type="text" name="body_pass">
<input type="password" name="pin" placeholder="pin">
<input type="file" name="file">
<input type="text" name="role">
<button type="submit" value="Signup" class="btn btn-outline-primary btn-block mb-5 ">Добавить</button>
</form>