from .models import Client
from django.contrib.auth.hashers import make_password
from .forms import ClientForm
form = ClientForm(request.POST)
if form.is_valid():
first_name = form.cleaned_data['first_name']
family_name = form.cleaned_data['family_name']
password = make_password(form.cleaned_data['password'])
phone = form.cleaned_data['phone']
user = Client(first_name=first_name, family_name=family_name, password=password, phone=phone)
user.save()