Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hardcoded admin2 url namespace) #414

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion djadmin2/viewmixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down