52dad1f9 by 周伟奇

admin test2

1 parent a64e17aa
...@@ -9,6 +9,8 @@ from settings import conf ...@@ -9,6 +9,8 @@ from settings import conf
9 from django.urls import reverse 9 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
13 from django.shortcuts import resolve_url
12 14
13 # Create your views here. 15 # Create your views here.
14 16
...@@ -68,8 +70,9 @@ class IWALoginView(IWABaseView, GenericView): ...@@ -68,8 +70,9 @@ class IWALoginView(IWABaseView, GenericView):
68 70
69 if is_valid: 71 if is_valid:
70 auth_login(request, data) 72 auth_login(request, data)
71 index_path = reverse('admin:index') 73 # index_path = reverse('admin:index')
72 return HttpResponseRedirect(index_path) 74 # return HttpResponseRedirect(index_path)
75 return HttpResponseRedirect(resolve_url(settings.LOGIN_REDIRECT_URL))
73 else: 76 else:
74 self.no_permission(data) 77 self.no_permission(data)
75 else: 78 else:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!