def registration(request): if request.method=="POST": p=UsForm(request.POST) if p.is_valid(): p.save() return redirect('/log') p=UsForm() return render(request,'services/register.html',{'u':p})
def registration(request): cf = CarCategory.objects.all() if request.method == "POST": p = UsForm(request.POST) if p.is_valid(): p.save() return redirect('/log') p = UsForm() return render(request, 'services/register.html', {'u': p}, {'s': cf})