Exemple #1
0
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})
Exemple #2
0
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})