diff --git a/src/apps/account/views.py b/src/apps/account/views.py index c54912f..e5060c3 100644 --- a/src/apps/account/views.py +++ b/src/apps/account/views.py @@ -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: