From f2e40aac626a729044366c0ea154418a8b157a8c Mon Sep 17 00:00:00 2001 From: Pahaz Blinov Date: Fri, 30 Jan 2015 01:44:21 +0500 Subject: [PATCH] fix(hardcoded `admin2` url namespace) --- djadmin2/viewmixins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/djadmin2/viewmixins.py b/djadmin2/viewmixins.py index f3dc8c4d..f258ee87 100644 --- a/djadmin2/viewmixins.py +++ b/djadmin2/viewmixins.py @@ -78,6 +78,7 @@ class Admin2Mixin(PermissionMixin): app_label = None index_path = reverse_lazy('admin2:dashboard') + logout_path = reverse_lazy('admin2:logout') def get_template_names(self): return [os.path.join( @@ -103,7 +104,7 @@ def dispatch(self, request, *args, **kwargs): if self.is_user(request): from .views import LoginView - if request.path == reverse('admin2:logout'): + if request.path == str(self.logout_path): return HttpResponseRedirect(self.index_path) if request.path == self.index_path: