Example #1
0
def register(request):
	if request.method=="POST":
		q=RegForm(request.POST)
		if q.is_valid():
			q.save()
			return redirect('/lg')
	q=RegForm()
	return render(request,'html/register.html',{'u':q})
Example #2
0
def register(request):
    d = Category.objects.all()
    if request.method == "POST":
        q = RegForm(request.POST)
        if q.is_valid():
            q.save()
            return redirect('/lg')
    q = RegForm()
    return render(request, 'html/register.html', {'u': q, 'data': d})