urls.py 946 Bytes
Newer Older
1
from django.contrib.auth.decorators import login_required
2
from django.urls import path
3

4
from people import views
5

6 7

# Regex order is really important here
Claude Paroz's avatar
Claude Paroz committed
8
urlpatterns = [
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    path('detail_change/',
         login_required(views.PersonEditView.as_view()),
         name='person_detail_change'),
    path('password_change/',
         views.person_password_change,
         name='person_password_change'),
    path('team_join/',
         views.person_team_join,
         name='person_team_join'),
    path('team_leave/<locale:team_slug>/',
         views.person_team_leave,
         name='person_team_leave'),
    path('<int:pk>/',
         views.PersonDetailView.as_view(),
         name='person_detail_id'),
24
    # Equivalent to the previous, but using username instead of user pk
25 26 27
    path('<slug>/',
         views.PersonDetailView.as_view(),
         name='person_detail_username'),
28

29
    path('', views.PeopleListView.as_view(), name='people'),
Claude Paroz's avatar
Claude Paroz committed
30
]