Skip to content

Commit b3aa568

Browse files
committed
this closes #5, logged in user can access login url
1 parent b3876ac commit b3aa568

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django_school/django_school/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from django.urls import include, path
22

33
from classroom.views import classroom, students, teachers
4+
from django.contrib.auth import views as auth_views
45

56
urlpatterns = [
67
path('', include('classroom.urls')),
8+
path('accounts/login/', auth_views.login, name='login', kwargs={'redirect_field_name': '/', 'redirect_authenticated_user': True}),
79
path('accounts/', include('django.contrib.auth.urls')),
810
path('accounts/signup/', classroom.SignUpView.as_view(), name='signup'),
911
path('accounts/signup/student/', students.StudentSignUpView.as_view(), name='student_signup'),

0 commit comments

Comments
 (0)