fix signups toggle
parent
de07b42082
commit
2354695401
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue