site_tps/users/urls.py

80 lines
1.5 KiB
Python
Raw Normal View History

from django.urls import path
2018-01-31 10:53:37 +00:00
from .views import (
CreateUser,
CreateSchool,
2018-03-02 08:33:37 +00:00
EditSchoolName,
EditSchoolPhone,
2018-02-28 14:06:55 +00:00
DeleteSchool,
2018-02-28 17:11:47 +00:00
Login,
Logout,
PasswordChange,
Profile,
2018-02-28 20:25:44 +00:00
School,
2018-03-01 23:23:41 +00:00
promote_user,
degrade_user
2018-01-31 10:53:37 +00:00
)
app_name = 'users'
urlpatterns = [
path(
'user/new',
CreateUser.as_view(),
name='new-user'
),
2018-02-28 17:11:47 +00:00
path(
'login',
Login.as_view(),
name='login'
),
path(
'logout',
Logout.as_view(),
name='logout',
),
path(
'change_password',
PasswordChange.as_view(),
name='change-password'
),
path(
'user/<int:pk>',
Profile.as_view(),
name='profile',
),
2018-01-31 10:53:37 +00:00
path(
'school/new',
CreateSchool.as_view(),
name='new-school'
),
2018-02-28 20:25:44 +00:00
path(
'school/<int:pk>',
School.as_view(),
name='school'
),
2018-03-01 23:23:41 +00:00
path(
'school/<int:school_pk>/degrade/<int:user_pk>',
degrade_user,
name='degrade-user'
),
path(
'school/<int:school_pk>/promote/<int:user_pk>',
promote_user,
name='promote-user'
),
2018-01-31 12:01:04 +00:00
path(
2018-03-02 08:33:37 +00:00
'school/<int:pk>/edit_name',
EditSchoolName.as_view(),
name='edit-school-name'
),
path(
'school/<int:pk>/edit_phone',
EditSchoolPhone.as_view(),
name='edit-school-phone'
2018-01-31 12:01:04 +00:00
),
2018-02-28 14:06:55 +00:00
path(
'school/<int:pk>/delete',
DeleteSchool.as_view(),
name='delete-school'
),
]