From 66622831d584ea5a7becedecc25494aa795daa0a Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Wed, 30 Nov 2016 00:29:39 -0800 Subject: [PATCH] add thanks url; need to fill in template --- ttadmin/users/views.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ttadmin/users/views.py b/ttadmin/users/views.py index 52f657a..51dcc3e 100644 --- a/ttadmin/users/views.py +++ b/ttadmin/users/views.py @@ -6,7 +6,6 @@ from django.http import HttpResponse from django.shortcuts import redirect from django.views.generic import TemplateView from django.views.generic.edit import FormView -from django.urls import reverse from .forms import TownieForm from .models import Townie @@ -14,11 +13,10 @@ from .models import Townie class SignupView(FormView): form_class = TownieForm template_name = 'users/signup.html' - # TODO reverse - success_url = '/thanks' def form_valid(self, form): + # TODO #t = Townie( # username=username, # displayname=displayname, @@ -28,10 +26,9 @@ class SignupView(FormView): #t.set_unusable_password() #t.save() - - return super().form_valid(form) + return redirect('users:thanks') -# TODO add template for this once i've fixed template directories +# TODO actually fill in this template class ThanksView(TemplateView): template_name = 'users/thanks.html'