Ejemplo n.º 1
0
def user_signup(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST or None)
        if form.is_valid():
            form.save()  # save user form data to user table
            username = form.cleaned_data.get('username')
            email = form.cleaned_data.get('email')
            password = form.cleaned_data.get('password1')
            #new_user = User.objects.create_user(username, email, raw_password, )
            new_user = authenticate(
                request,
                username=username,
                email=email,
                password=password,
            )  #login after registration
            if new_user is not None:
                login(request, new_user)

            return redirect('/')
        else:
            form = SignUpForm()
            messages.success(
                request,
                "Username and email must be unique. Make sure passwords match!"
            )
        return render(request, 'user_signup.html', {'form': form})
    else:
        form = SignUpForm()
    return render(request, 'user_signup.html', {'form': form})
Ejemplo n.º 2
0
def joinLeague(request):
	current_user = request.user
	if request.method == 'POST':
		form = JoinLeagueForm(request.POST)
		if form.is_valid():
			password = form.cleaned_data.get('password')
			username = form.cleaned_data.get('username')
			league = League.objects.get(name=username)
			#print(league)
			# try:
				# password = form.cleaned_data.get('password')
				# username = form.cleaned_data.get('username')
				# league = League.objects.get(name=username)
			# except:
				# return HttpResponseRedirect('/joinLeague')
			#if league.joinPassword == password:
			# #league.numPlayers = 0
			# # for p in players:
				# # league.numPlayers+=1
			players = Player.objects.filter(leagueID = league)
			for p in players:
				if p.userID == current_user:
					return HttpResponseRedirect('/joinLeague')

			newPlayer = Player(leagueID=league,userID=current_user, buyingPower = league.startingBalance,percentChange=0,totalWorth=0,isAi=False, cumWorth = league.startingBalance)
			league.numPlayers+=1
			league.save()
			newPlayer.save()
			return HttpResponseRedirect('/dashboard')
		else:
			return render(request, 'joinleague.html', {'form': form})
	else:
		form = SignUpForm()
		return render(request, 'joinleague.html', {'form': form})
Ejemplo n.º 3
0
def newLeague(request):
	date_inpast = False
	current_user = request.user
	if (request.method == 'POST' and current_user.is_authenticated):
		form = LeagueForm(request.POST)
		if form.is_valid():
			lname = form.cleaned_data.get('lname')
			joinpwd = form.cleaned_data.get('joinpwd')
			startbal = form.cleaned_data.get('startBalance')
			ltype = form.cleaned_data.get('leagueType')
			enddate = form.cleaned_data.get('endDate')
			date_out = datetime.datetime(*[int(v) for v in enddate.replace('T', '-').replace(':', '-').split('-')])

			b = False
			if ltype=="crypto":
				b = True
			new_league = League(adminID = current_user.id,name=lname,numPlayers=1,joinPassword=joinpwd,startingBalance=startbal,isCrypto=b, endDate=date_out,isUniversal=False, hasEnded = False)
			new_league.save()
			newPlayer = Player(leagueID=new_league,userID=current_user, buyingPower = startbal,percentChange=0,totalWorth=0, cumWorth = startbal, isAi = False)
			newPlayer.save()
			return HttpResponseRedirect('/dashboard')
		else:
			return render(request, 'createleague.html', {'form': form})
	else:
		form = SignUpForm()
		return render(request, 'createleague.html', {'form': form})
Ejemplo n.º 4
0
def contact_home(request):
    contactForm = ContactUserForm(request.POST or None, prefix="contactForm")
    context = {
        'contactForm': contactForm,
    }

    if not request.user.is_authenticated():
        formLogin = LoginForm(request.POST or None, prefix="loginForm")
        formSignup = SignUpForm(request.POST or None, prefix="signupForm")
        formFb = FbForm(request.POST or None, prefix="FBform")
        context['formLogin'] = formLogin
        context['formSignup'] = formSignup
        context['formFb'] = formFb

    if contactForm.is_valid():
        print(contactForm.cleaned_data)
        contactForm.save()
        print("saving form")
    return render(request, 'contact/contact_home.html', context)


# for contact form
# def contact_user_form(request):
# 	if request.method == 'POST':
# 		print(request.POST.get('contactForm-email'))
# 		if form.is_valid():
# 			form.save()
# 		return HttpResponse('success')
Ejemplo n.º 5
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')

            user = authenticate(request, username=username, password=password)

            user_profile = UserProfile()
            user_profile.user = user
            user_profile.image = "images/users/default.jpeg"
            user_profile.save()

            login(request, user)
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    setting = Setting.objects.get(pk=1)
    context = {
        'category': category,
        'form': form,
        'setting': setting,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 6
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)

            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/users.png"
            data.save()
            return HttpResponseRedirect('/')
        else:
            messages.warning(request, form.errors)
            return HttpResponseRedirect('/signup')

    form = SignUpForm()
    category = Category.objects.all()
    setting = Setting.objects.get(pk=4)
    context = {
        'category': category,
        'form': form,
        'setting': setting,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 7
0
def signup_form(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()  # completed sign up
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            # Create data in profile table for user
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()
            messages.success(request, 'Your account has been created!')
            return HttpResponseRedirect('/')
        else:
            messages.warning(request, form.errors)
            return HttpResponseRedirect('/signup')

    form = SignUpForm()
    setting = Setting.objects.get(pk=1)
    category = Category.objects.all()
    context = {'setting': setting, 'category': category, 'form': form}

    return render(request, 'signup.html', context)
Ejemplo n.º 8
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)

            # create data in profile table for user
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.save()
            messages.success(request, "Hoş geldiniz..")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    setting = Setting.objects.get(pk=1)
    context = {
        'setting': setting,
        'page': 'signup',
        'category': category,
        'form': form,
    }

    return render(request, 'signup.html', context)
Ejemplo n.º 9
0
def signup_view(request):
    if request.method == 'POST':  # Form post edildiyse
        form = SignUpForm(request.POST)
        if form.is_valid():  #formun şartlarına bakılıyor,şifreler uyuyor mu vb
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)

            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()
            messages.success(request, "Üyeliğininz Tamamlandı..")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 10
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(request, username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile(
            )  #kişi kayıt olduğunda otomatik profile oluşturmak için
            data.user_id = current_user.id
            data.image = "images/user.jpg"
            data.phone = 123456789
            data.save()
            messages.success(request,
                             "Sisteme başarılı bir şekilde kaydoldunuz")
            return HttpResponseRedirect('/')

        else:
            messages.error(request, "Hata. ")
            return HttpResponseRedirect('/signup')
    form = SignUpForm()
    category = Category.objects.all()
    setting = Setting.objects.get(pk=1)
    context = {'category': category, 'form': form, 'setting': setting}
    return render(request, 'signup.html', context)
Ejemplo n.º 11
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)  #formumuzu signup ile ilişkilendirdik.
        if form.is_valid(
        ):  #valid kontrolü yaptık. şifre vs. uymuyorsa kurallara buna takılıyor.
            form.save(
            )  #kurallar dolu mu boş mu şifreler aynı mı uyuyor mu vs. dorm.save ile tüm elemanları alıp eşleştirdik.
            #return HttpResponse("Üye kaydedildi.") #kontrol ettim.
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)

            #Create data in profile table for user
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/user/user.png"
            data.save()
            messages.success(
                request,
                "Hoş Geldiniz.. Sitemize başarılı bir şekilde üye oldunuz. İyi yolculuklar dileriz."
            )
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 12
0
def signup_view(request):
    setting = Setting.objects.get(pk=1)
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)

            #User profile tablosunu beraberinde oluştur
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/user/user.png"
            data.save()
            messages.success(request, "Hesabınız başarıyla oluşturuldu.")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    last_posts = Post.objects.filter(status=True).order_by('-id')[:4]
    context = {
        'setting': setting,
        'category': category,
        'form': form,
        'last_posts': last_posts,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 13
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)

        if form.is_valid():
            form.save()
            username = form.cleaned_data['username']
            password = form.cleaned_data['password1']
            user = authenticate(username=username, password=password)
            login(request, user)

            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()

            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {'category': category,
               'form': form,
               }
    return render(request, 'signup.html', context)
Ejemplo n.º 14
0
def signupView(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            #data.image="images/users/user.png"
            data.save()
            messages.success(request, 'Üye kaydınız başarılı!')
            return HttpResponseRedirect("/")

        else:
            messages.warning(request, 'Bilgilerinizde hata var!')
            return HttpResponseRedirect('/signup/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }

    return render(request, 'customer-register.html', context)
Ejemplo n.º 15
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(request, username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()
            messages.success(
                request, "Hoş Geldiniiz,Başarılı bir şeklilde kayıt oldunuz.")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 16
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            #create data in profile table for user
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()
            messages.success(request,
                "Hoş Geldiniz.. Kendi ev kiralama siteme başarılı bir şekilde üye oldunuz.İyi gezinmeler dilerim.")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 17
0
def signup_view(request):
    setting = Setting.objects.get(pk=1)
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            messages.success(
                request,
                " Kayıt oldunuz... Profilinizi oluşturmanız gerekmekte lütfen Oluşturun..! "
            )
            return HttpResponseRedirect('/user/adduserprofile')
        else:
            messages.warning(
                request,
                "Hata oluştu ! Doldurulması gereken alanları doldurun ve şifreyi kurallara göre oluşturun..! "
            )
            return HttpResponseRedirect('/signup')
    form = SignUpForm()
    category = Categories.objects.all()
    context = {
        'category': category,
        'form': form,
        'setting': setting,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 18
0
    def signup(request):
        if request.method == 'POST':
            form = SignUpForm(request.POST)
            if form.is_valid():
                form.save()
                username = form.cleaned_data.get('username')
                raw_password = form.cleaned_data.get('password1')
                user = authenticate(username=username, password=raw_password)
                user.is_active = False
                user.save()

                if user is not None:
                    if user.is_active:
                        auth_login(request, user)
                        return redirect('index')
                    else:
                        messages.error(request, 'Verify Email To Login')
                else:
                    messages.error(request,
                                   'username or password is incorrect')
                return redirect('login')
            else:
                return render(request, 'registration/register.html',
                              {'form': form})
        else:
            form = SignUpForm()
            return render(request, 'registration/register.html',
                          {'form': form})
def signup_view(request):
    if request.method == 'POST':  # check form post
        form = SignUpForm(request.POST)
        if form.is_valid(
        ):  #if else yapmıyoruz burada validation zaten uygun mu değil mi kontrol ediyor her şeyi
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            #Create data in profile table for user
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.save()
            messages.success(request,
                             "Hoşgeldiniz!")  # tek kullanımlık mesaj alanı
            return HttpResponseRedirect("/")

    form = SignUpForm()
    menu = Menu.objects.all()
    context = {
        'menu': menu,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 20
0
def signup_view(request):
    setting = Setting.objects.get(pk=1)
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(request, username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = 'images/users/user.png'
            data.save()
            messages.success(
                request,
                "Hoş geldiniz... Sitemize başarılı bir şekilde üye oldunuz. İyi alışverişler dileriz."
            )
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
        'setting': setting,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 21
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = request.POST['username']
            password = request.POST['password1']
            user = authenticate(request, username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.photo = "images/users/user.png"
            data.save()
            return HttpResponseRedirect('/')

        else:
            pass1 = request.POST['password1']
            pass2 = request.POST['password2']
            if pass1 != pass2:
                messages.warning(request, "Girilen şifreler eşleşmiyor.")
                return HttpResponseRedirect('/signup')
            else:
                messages.warning(request, "Üyelik Oluşturulurken Bir Hata Oluştu")
                return HttpResponseRedirect('/signup')
    form = SignUpForm()
    category = Category.objects.all()

    context = {'category': category,
               'form': form,
            }
    return render(request, 'signup.html', context)
Ejemplo n.º 22
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.png"
            data.email = form.cleaned_data.get('email')
            data.phone = form.cleaned_data.get('phone')
            data.biography = form.cleaned_data.get('biography')
            data.facebook = form.cleaned_data.get('facebook')
            data.contact_detail = form.cleaned_data.get('contact_detail')
            data.skype = form.cleaned_data.get('skype')
            data.save()
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    setting = Setting.objects.get(pk=1)
    context = {'category': category, 'form': form, 'setting': setting}
    return render(request, 'signup.html', context)
Ejemplo n.º 23
0
def signup_view(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = request.POST['username']
            password = request.POST['password1']
            user = authenticate(request, username=username, password=password)
            login(request, user)
            current_user = request.user
            data = UserProfile()
            data.user_id = current_user.id
            data.image = "images/users/user.jpg"
            data.save()
            messages.success(
                request,
                "Hoşgeldiniz...Sistemimize başarılı bir şekilde üye oldunuz.")
            return HttpResponseRedirect('/')

    form = SignUpForm()
    category = Category.objects.all()
    context = {
        'category': category,
        'form': form,
    }
    return render(request, 'signup.html', context)
Ejemplo n.º 24
0
def basic_instruction(request):
	context={}
	if not request.user.is_authenticated():
		formLogin = LoginForm(request.POST or None, prefix="loginForm")
		formSignup = SignUpForm(request.POST or None, prefix="signupForm")
		formFb = FbForm(request.POST or None, prefix="FBform")
		context['formLogin'] = formLogin
		context['formSignup'] = formSignup
		context['formFb'] = formFb
		
	return render(request,"instruction/basicInstruction.html",context)
Ejemplo n.º 25
0
    def post(self, request):
        """Gets info, in case if it is valid, code id and user's info
        in form if uis and token. And send a letter to the user to
        confirm registration"""
        sign_form = SignUpForm(request.POST)
        if sign_form.is_valid():
            user = sign_form.save()
            user.is_active = False
            user.set_password(request.POST['password1'])
            user.save()

            uid = urlsafe_base64_encode(force_bytes(user.pk))
            token = default_token_generator.make_token(user=user)
            activate_url = '{}/{}/{}'.format(
                "http://127.0.0.1:8000/activate", uid, token)

            send_email(recipient_list=[user.email], activate_url=activate_url)
            return HttpResponse("Link to confirm and complete registration has been sent to your email!")

        else:
            return HttpResponse("Info is not valid!")
Ejemplo n.º 26
0
def email_already_in_use(request):
    context = {}
    # if not logged in
    if not request.user.is_authenticated():
        formLogin = LoginForm(request.POST or None, prefix="loginForm")
        formSignup = SignUpForm(request.POST or None, prefix="signupForm")
        formFb = FbForm(request.POST or None, prefix="FBform")
        context = {
            'formLogin': formLogin,
            'formSignup': formSignup,
            'formFb': formFb,
        }
    return render(request, "home/emailAlreadyInUse.html", context)
Ejemplo n.º 27
0
def home(request):
    context = {}
    # if not logged in
    if not request.user.is_authenticated():
        formLogin = LoginForm(request.POST or None, prefix="loginForm")
        formSignup = SignUpForm(request.POST or None, prefix="signupForm")
        formFb = FbForm(request.POST or None, prefix="FBform")
        context = {
            'formLogin': formLogin,
            'formSignup': formSignup,
            'formFb': formFb,
        }
    return render(request, 'home/frontPage.html', context)
Ejemplo n.º 28
0
def rego_email_sent(request):
    context = {}
    # if not logged in
    if not request.user.is_authenticated():
        formLogin = LoginForm(request.POST or None, prefix="loginForm")
        formSignup = SignUpForm(request.POST or None, prefix="signupForm")
        formFb = FbForm(request.POST or None, prefix="FBform")
        context = {
            'formLogin': formLogin,
            'formSignup': formSignup,
            'formFb': formFb,
        }
    return render(request, "home/regoEmailSent.html", context)
Ejemplo n.º 29
0
Archivo: views.py Proyecto: is-2/SGC
def sign_up(request):
    """
    Registrar-se.
    """
    form = SignUpForm()
    if request.method == "POST":
        form = SignUpForm(request.POST)
        if form.is_valid():
            username    = form.cleaned_data['username']
            password    = form.cleaned_data['password']
            email       = form.cleaned_data['email']
            telephone   = form.cleaned_data['telephone']
            u = User(username=username, email=email)
            u.set_password(password)
            u.save() # Save information
            u.client = Client(telephone=telephone)
            u.client.save()
            return HttpResponseRedirect('/')
        else:
            ctx = {'form':form}
            return render_to_response('home/signup.html', ctx, context_instance=RequestContext(request))
    ctx = {'form':form}
    return render_to_response('home/signup.html', ctx, context_instance=RequestContext(request))
Ejemplo n.º 30
0
def user_signup(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save() #Save user form data to user table
            username = form.cleaned_data.get('username')
            raw_password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=raw_password) #login after registration
            login(request, user)
            return redirect('/')
    else:
        form = SignUpForm()
    return render(request, 'user_signup.html', {'form': form})
Ejemplo n.º 31
0
def register(request):
    if request.method == "POST":
        form = SignUpForm(request.POST)
        if form.is_valid():
            email = form.cleaned_data.get('email')

            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password1')

            user = User.objects.create_user(username, email, password)
            user.is_active = True
            user.save()

            login(request, user, backend='django.contrib.auth.backends.ModelBackend' )
            return redirect('/')
        else:
            return render(request, 'home/register.html', {
                'form' : form
            })
    else:
        form = SignUpForm()
        return render(request, 'home/register.html', {
            'form' : form
        })