52dad1f9 by 周伟奇

admin test2

1 parent a64e17aa
......@@ -9,6 +9,8 @@ from settings import conf
from django.urls import reverse
from django.http import HttpResponseRedirect
from django.contrib.auth import login as auth_login
from django.conf import settings
from django.shortcuts import resolve_url
# Create your views here.
......@@ -68,8 +70,9 @@ class IWALoginView(IWABaseView, GenericView):
if is_valid:
auth_login(request, data)
index_path = reverse('admin:index')
return HttpResponseRedirect(index_path)
# index_path = reverse('admin:index')
# return HttpResponseRedirect(index_path)
return HttpResponseRedirect(resolve_url(settings.LOGIN_REDIRECT_URL))
else:
self.no_permission(data)
else:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!