From d3313c7ecf633ae892468aae391649725640c76d Mon Sep 17 00:00:00 2001 From: Vadim Melnikov Date: Thu, 25 Feb 2021 18:52:57 +0300 Subject: [PATCH] Added kind of dirty registration failed html --- access_controller/urls.py | 3 ++- main/templates/pages/registration_failed.html | 21 +++++++++++++++++++ main/views.py | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 main/templates/pages/registration_failed.html diff --git a/access_controller/urls.py b/access_controller/urls.py index b2603b2..c35ae58 100644 --- a/access_controller/urls.py +++ b/access_controller/urls.py @@ -20,7 +20,7 @@ from django.urls import path, include from access_controller import settings from access_controller.settings import DEBUG -from main.views import main_page, profile_page, CustomRegistrationView +from main.views import main_page, profile_page, CustomRegistrationView, registration_failed urlpatterns = [ path('admin/', admin.site.urls, name='admin'), @@ -30,4 +30,5 @@ urlpatterns = [ path('accounts/login/', LoginView.as_view(extra_context={}), name='login'), # TODO add extra context path('accounts/', include('django.contrib.auth.urls')), path('accounts/', include('django_registration.backends.one_step.urls')), + path('registration_failed/', registration_failed, name='registration_failed'), ] diff --git a/main/templates/pages/registration_failed.html b/main/templates/pages/registration_failed.html new file mode 100644 index 0000000..91e2258 --- /dev/null +++ b/main/templates/pages/registration_failed.html @@ -0,0 +1,21 @@ + + + + + + + +
+
+

К сожалению, регистрация закрыта.

+
+
+ На главную +
+
+ + \ No newline at end of file diff --git a/main/views.py b/main/views.py index 797ea8b..5348642 100644 --- a/main/views.py +++ b/main/views.py @@ -70,3 +70,6 @@ def profile_page(request): def main_page(request): return render(request, 'pages/index.html') + +def registration_failed(request): + return render(request, 'pages/registration_failed.html')