Skip to content

Commit

Permalink
Take admin to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Aug 8, 2021
1 parent 9818ec7 commit 735003e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hasworn/views.py
Expand Up @@ -18,7 +18,10 @@ class Login(views.LoginView):
template_name='login.html'

def get_success_url(self):
return reverse('homepage')
if self.request.user.is_superuser:
return reverse('admin:index')
else:
return reverse('homepage')


class Logout(views.LogoutView):
Expand Down

0 comments on commit 735003e

Please sign in to comment.