From 739913a2c9b1ea51db6ee35f69d517f327f376fb Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Sat, 7 Mar 2020 15:25:58 +0000 Subject: [PATCH] FIX: Re-add overridden login view --- RIGS/test_functional.py | 2 +- RIGS/urls.py | 1 + RIGS/views.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RIGS/test_functional.py b/RIGS/test_functional.py index ab1b0494..e6af1815 100644 --- a/RIGS/test_functional.py +++ b/RIGS/test_functional.py @@ -95,7 +95,7 @@ class UserRegistrationTest(LiveServerTestCase): alert = self.browser.find_element_by_css_selector( 'div.alert-danger').text # Note to future maintainers - mind out for smart quotes... - self.assertIn("password fields didn’t match", alert) + self.assertIn("password fields didn't match", alert) # Passwords should be empty self.assertEqual(password1.get_attribute('value'), '') diff --git a/RIGS/urls.py b/RIGS/urls.py index 0b90a575..1e162c38 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -17,6 +17,7 @@ urlpatterns = [ url('^$', login_required(views.Index.as_view()), name='index'), url(r'^closemodal/$', views.CloseModal.as_view(), name='closemodal'), + path('user/login/', views.login, name='login'), path('user/login/embed/', xframe_options_exempt(views.LoginEmbed.as_view()), name='login_embed'), url(r'^search_help/$', views.SearchHelp.as_view(), name='search_help'), diff --git a/RIGS/views.py b/RIGS/views.py index 06613bf1..b45e8a05 100644 --- a/RIGS/views.py +++ b/RIGS/views.py @@ -34,7 +34,7 @@ class Index(generic.TemplateView): context['rig_count'] = models.Event.objects.rig_count() return context - +# TODO: CBV? def login(request, **kwargs): if request.user.is_authenticated: next = request.GET.get('next', '/')