support for pausing signups

pause-signups
vilmibm 2019-07-02 04:46:29 +00:00
parent 57e18fb337
commit a8917a05c3
2 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
{% if signups_enabled %}
<form class="tilde" action="{% url 'users:signup' %}" method="post">
{% csrf_token %}
<table id="signup">
@ -40,5 +41,11 @@
<input type="submit" value="sign up <3" />
</div>
</form>
{% else %}
<p>
Town signups are currently disabled, but will resume in the future. If you can't wait for an account, you
can check out some <a href="https://tildeverse.org/">similar servers</a>.
</p>
{% endif %}
</body>
</html>

View File

@ -15,6 +15,7 @@ from .models import Townie, Pubkey
class SignupView(FormView):
form_class = TownieForm
template_name = 'users/signup.html'
extra_context = {"signups_enabled": False}
@transaction.atomic
def form_valid(self, form):