5df67344 by 周伟奇

admin test7

1 parent f0178fbb
...@@ -10,7 +10,7 @@ from django.urls import reverse ...@@ -10,7 +10,7 @@ from django.urls import reverse
10 from django.http import HttpResponseRedirect 10 from django.http import HttpResponseRedirect
11 from django.contrib.auth import login as auth_login 11 from django.contrib.auth import login as auth_login
12 from django.conf import settings 12 from django.conf import settings
13 from django.shortcuts import resolve_url 13 from django.shortcuts import resolve_url, redirect
14 14
15 # Create your views here. 15 # Create your views here.
16 16
...@@ -69,10 +69,11 @@ class IWALoginView(IWABaseView, GenericView): ...@@ -69,10 +69,11 @@ class IWALoginView(IWABaseView, GenericView):
69 is_valid, data = self.validate_admin(q_number) 69 is_valid, data = self.validate_admin(q_number)
70 70
71 if is_valid: 71 if is_valid:
72 auth_login(request, data)
73 request.user = data 72 request.user = data
74 index_path = reverse('admin:index') 73 auth_login(request, data)
75 return HttpResponseRedirect(index_path) 74 # index_path = reverse('admin:index')
75 # return HttpResponseRedirect(index_path)
76 return redirect('https://staging-bmw-ocr.situdata.com/admin/')
76 else: 77 else:
77 self.no_permission(data) 78 self.no_permission(data)
78 else: 79 else:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!