fix signups toggle

master
vilmibm 2019-08-20 21:39:38 +00:00
parent de07b42082
commit 2354695401
1 changed files with 8 additions and 1 deletions

View File

@ -12,10 +12,17 @@ from django.views.generic.edit import FormView
from .forms import TownieForm from .forms import TownieForm
from .models import Townie, Pubkey from .models import Townie, Pubkey
SIGNUPS_ENABLED = True
class SignupView(FormView): class SignupView(FormView):
form_class = TownieForm form_class = TownieForm
template_name = 'users/signup.html' template_name = 'users/signup.html'
extra_context = {"signups_enabled": False}
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['signups_enabled'] = SIGNUPS_ENABLED
return ctx
@transaction.atomic @transaction.atomic
def form_valid(self, form): def form_valid(self, form):