Skip to content

Commit

Permalink
Redirect logged-in users from login
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Nov 18, 2024
1 parent a1d4bbd commit b8424c7
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 156 deletions.
2 changes: 2 additions & 0 deletions backend/civil_society_vote/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LoginView
from django.urls import include, path, reverse
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import RedirectView
Expand Down Expand Up @@ -74,6 +75,7 @@
StaticPageView.as_view(template_name="accounts/error_user_role.html"),
name="error-user-role",
),
path(_("accounts/login/"), LoginView.as_view(redirect_authenticated_user=True), name="login"),
path(_("accounts/"), include("django.contrib.auth.urls")),
path(
_("accounts/reset-password/"),
Expand Down
Loading

0 comments on commit b8424c7

Please sign in to comment.