diff --git a/app/authentification/templates/email_not_set.html b/app/authentification/templates/email_not_set.html new file mode 100644 index 00000000..7a9e894e --- /dev/null +++ b/app/authentification/templates/email_not_set.html @@ -0,0 +1,12 @@ +{% extends "base_auth.html" %} + +{% block content_auth %} +
+

+ The webmaster hasn't set up any emails yet, so we can't send you any link confirmation +

+

+ Please contact the admin to learn more +

+
+{% endblock %} diff --git a/app/authentification/views.py b/app/authentification/views.py index 83abf37c..d0c55d83 100644 --- a/app/authentification/views.py +++ b/app/authentification/views.py @@ -26,6 +26,9 @@ class SignupView(TemplateView): if not bool(settings.ALLOW_SIGNUP): return redirect('signup') + if not hasattr(settings, "EMAIL_BACKEND") or not hasattr(settings, "EMAIL_HOST"): + return render(request, 'email_not_set.html') + if form.is_valid(): user = form.save(commit=False) user.is_active = False