gestioCOF/gestioncof/urls.py

166 lines
4.7 KiB
Python
Raw Permalink Normal View History

from django.contrib.auth import views as django_auth_views
from django.urls import include, path
from django.views.generic.base import TemplateView
from django_cas_ng import views as django_cas_views
from gestioncof import csv_views, views
export_patterns = [
2020-08-11 17:38:57 +02:00
path("members", views.export_members, name="export.members"),
2019-04-12 17:07:03 +02:00
path(
2020-09-01 15:35:18 +02:00
"mega/avecremarques",
views.export_mega_remarksonly,
name="export.mega.remarks",
),
2019-04-12 17:07:03 +02:00
path(
"mega/participants",
views.export_mega_participants,
2020-08-11 17:20:59 +02:00
name="export.mega.participants",
),
2020-08-11 17:20:59 +02:00
path("mega/orgas", views.export_mega_orgas, name="export.mega.orgas"),
path("mega/all", views.export_mega, name="export.mega.all"),
]
surveys_patterns = [
2019-04-12 17:07:03 +02:00
path("<int:survey_id>/status", views.survey_status, name="survey.details.status"),
path("<int:survey_id>", views.survey, name="survey.details"),
]
events_patterns = [
2019-04-12 17:07:03 +02:00
path("<int:event_id>", views.event, name="event.details"),
path("<int:event_id>/status", views.event_status, name="event.details.status"),
]
calendar_patterns = [
2019-04-12 17:07:03 +02:00
path("subscription", views.calendar, name="calendar"),
path("<slug:token>/calendar.ics", views.calendar_ics, name="calendar.ics"),
]
clubs_patterns = [
2019-04-12 17:07:03 +02:00
path("membres/<slug:name>", views.membres_club, name="membres-club"),
path("liste", views.liste_clubs, name="liste-clubs"),
path(
"change_respo/<slug:club_name>/<int:user_id>",
views.change_respo,
name="change-respo",
),
]
registration_patterns = [
# Inscription d'un nouveau membre
path("", views.registration, name="registration"),
path(
"clipper/<slug:login_clipper>/<fullname>",
views.registration_form2,
name="clipper-registration",
),
2020-09-01 15:35:18 +02:00
path(
"user/<username>",
views.registration_form2,
name="user-registration",
),
path(
"empty",
views.registration_form2,
name="empty-registration",
),
# Autocompletion
path(
"autocomplete",
views.RegistrationAutocompleteView.as_view(),
name="cof.registration.autocomplete",
),
]
urlpatterns = [
path(
"admin/<slug:app_label>/<slug:model_name>/csv/",
csv_views.admin_list_export,
{"fields": ["username"]},
),
# -----
# Misc
# -----
path("", views.HomeView.as_view(), name="home"),
2020-12-09 21:57:40 +01:00
path("reset_comptes/", views.ResetComptes.as_view(), name="reset_comptes"),
path(
"user/autocomplete",
views.UserAutocompleteView.as_view(),
name="cof-user-autocomplete",
),
path("config", views.ConfigUpdate.as_view(), name="config.edit"),
# -----
# Authentification
# -----
path(
"cof/denied",
TemplateView.as_view(template_name="cof-denied.html"),
name="cof-denied",
),
path("cas/login", django_cas_views.LoginView.as_view(), name="cas_login_view"),
path("cas/logout", django_cas_views.LogoutView.as_view()),
2020-09-01 15:35:18 +02:00
path(
"outsider/login",
views.LoginExtView.as_view(),
name="ext_login_view",
),
path(
"outsider/logout",
django_auth_views.LogoutView.as_view(),
{"next_page": "home"},
),
path("login", views.login, name="cof-login"),
path("logout", views.logout, name="cof-logout"),
path("admin/logout/", views.logout),
# -----
# Infos persos
# -----
path("profile", views.profile, name="profile"),
path(
"outsider/password-change",
django_auth_views.PasswordChangeView.as_view(),
name="password_change",
),
path(
"outsider/password-change-done",
django_auth_views.PasswordChangeDoneView.as_view(),
name="password_change_done",
),
# -----
# Liens utiles du COF et du BdA
# -----
path("utile_cof", views.utile_cof, name="utile_cof"),
path("utile_bda", views.utile_bda, name="utile_bda"),
path("utile_bda/bda_diff", views.liste_bdadiff, name="ml_diffbda"),
path("utile_cof/diff_cof", views.liste_diffcof, name="ml_diffcof"),
2020-09-01 15:35:18 +02:00
path(
"utile_bda/bda_revente",
views.liste_bdarevente,
name="ml_bda_revente",
),
# -----
# Inscription d'un nouveau membre
# -----
path("registration/", include(registration_patterns)),
# -----
# Les exports
# -----
path("export/", include(export_patterns)),
# -----
# Les sondages
# -----
path("survey/", include(surveys_patterns)),
# -----
# Evenements
# -----
path("event/", include(events_patterns)),
# -----
# Calendrier
# -----
path("calendar/", include(calendar_patterns)),
# -----
# Clubs
# -----
path("clubs/", include(clubs_patterns)),
]