mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
FIX: Re-add overridden login view
This commit is contained in:
@@ -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'), '')
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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', '/')
|
||||
|
||||
Reference in New Issue
Block a user