forked from DGNum/gestioCOF
Global urlconf file
This commit is contained in:
parent
759b6d9489
commit
019acb90ac
1 changed files with 56 additions and 58 deletions
114
cof/urls.py
114
cof/urls.py
|
@ -3,11 +3,11 @@ Fichier principal de configuration des urls du projet GestioCOF
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, url
|
|
||||||
from django.conf.urls.i18n import i18n_patterns
|
from django.conf.urls.i18n import i18n_patterns
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth import views as django_views
|
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.views.generic.base import TemplateView
|
||||||
from django_cas_ng import views as django_cas_views
|
from django_cas_ng import views as django_cas_views
|
||||||
from wagtail.admin import urls as wagtailadmin_urls
|
from wagtail.admin import urls as wagtailadmin_urls
|
||||||
|
@ -28,107 +28,105 @@ admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# Page d'accueil
|
# Page d'accueil
|
||||||
url(r"^$", gestioncof_views.home, name="home"),
|
path("", gestioncof_views.home, name="home"),
|
||||||
# Le BdA
|
# Le BdA
|
||||||
url(r"^bda/", include("bda.urls")),
|
path("bda/", include("bda.urls")),
|
||||||
# Les exports
|
# Les exports
|
||||||
url(r"^export/", include(export_patterns)),
|
path("export/", include(export_patterns)),
|
||||||
# Les petits cours
|
# Les petits cours
|
||||||
url(r"^petitcours/", include("petitscours.urls")),
|
path("petitcours/", include("petitscours.urls")),
|
||||||
# Les sondages
|
# Les sondages
|
||||||
url(r"^survey/", include(surveys_patterns)),
|
path("survey/", include(surveys_patterns)),
|
||||||
# Evenements
|
# Evenements
|
||||||
url(r"^event/", include(events_patterns)),
|
path("event/", include(events_patterns)),
|
||||||
# Calendrier
|
# Calendrier
|
||||||
url(r"^calendar/", include(calendar_patterns)),
|
path("calendar/", include(calendar_patterns)),
|
||||||
# Clubs
|
# Clubs
|
||||||
url(r"^clubs/", include(clubs_patterns)),
|
path("clubs/", include(clubs_patterns)),
|
||||||
# Authentification
|
# Authentification
|
||||||
url(
|
path(
|
||||||
r"^cof/denied$",
|
"cof/denied",
|
||||||
TemplateView.as_view(template_name="cof-denied.html"),
|
TemplateView.as_view(template_name="cof-denied.html"),
|
||||||
name="cof-denied",
|
name="cof-denied",
|
||||||
),
|
),
|
||||||
url(r"^cas/login$", django_cas_views.LoginView.as_view(), name="cas_login_view"),
|
path("cas/login", django_cas_views.LoginView.as_view(), name="cas_login_view"),
|
||||||
url(r"^cas/logout$", django_cas_views.LogoutView.as_view()),
|
path("cas/logout", django_cas_views.LogoutView.as_view()),
|
||||||
url(
|
path(
|
||||||
r"^outsider/login$",
|
"outsider/login", gestioncof_views.LoginExtView.as_view(), name="ext_login_view"
|
||||||
gestioncof_views.LoginExtView.as_view(),
|
|
||||||
name="ext_login_view",
|
|
||||||
),
|
),
|
||||||
url(r"^outsider/logout$", django_views.LogoutView.as_view(), {"next_page": "home"}),
|
path(
|
||||||
url(r"^login$", gestioncof_views.login, name="cof-login"),
|
"outsider/logout", django_auth_views.LogoutView.as_view(), {"next_page": "home"}
|
||||||
url(r"^logout$", gestioncof_views.logout, name="cof-logout"),
|
),
|
||||||
|
path("login", gestioncof_views.login, name="cof-login"),
|
||||||
|
path("logout", gestioncof_views.logout, name="cof-logout"),
|
||||||
# Infos persos
|
# Infos persos
|
||||||
url(r"^profile$", gestioncof_views.profile, name="profile"),
|
path("profile", gestioncof_views.profile, name="profile"),
|
||||||
url(
|
path(
|
||||||
r"^outsider/password-change$",
|
"outsider/password-change",
|
||||||
django_views.password_change,
|
django_auth_views.PasswordChangeView.as_view(),
|
||||||
name="password_change",
|
name="password_change",
|
||||||
),
|
),
|
||||||
url(
|
path(
|
||||||
r"^outsider/password-change-done$",
|
"outsider/password-change-done",
|
||||||
django_views.password_change_done,
|
django_auth_views.PasswordChangeDoneView.as_view(),
|
||||||
name="password_change_done",
|
name="password_change_done",
|
||||||
),
|
),
|
||||||
# Inscription d'un nouveau membre
|
# Inscription d'un nouveau membre
|
||||||
url(r"^registration$", gestioncof_views.registration, name="registration"),
|
path("registration", gestioncof_views.registration, name="registration"),
|
||||||
url(
|
path(
|
||||||
r"^registration/clipper/(?P<login_clipper>[\w-]+)/" r"(?P<fullname>.*)$",
|
"registration/clipper/<slug:login_clipper>/<fullname>",
|
||||||
gestioncof_views.registration_form2,
|
gestioncof_views.registration_form2,
|
||||||
name="clipper-registration",
|
name="clipper-registration",
|
||||||
),
|
),
|
||||||
url(
|
path(
|
||||||
r"^registration/user/(?P<username>.+)$",
|
"registration/user/<username>",
|
||||||
gestioncof_views.registration_form2,
|
gestioncof_views.registration_form2,
|
||||||
name="user-registration",
|
name="user-registration",
|
||||||
),
|
),
|
||||||
url(
|
path(
|
||||||
r"^registration/empty$",
|
"registration/empty",
|
||||||
gestioncof_views.registration_form2,
|
gestioncof_views.registration_form2,
|
||||||
name="empty-registration",
|
name="empty-registration",
|
||||||
),
|
),
|
||||||
# Autocompletion
|
# Autocompletion
|
||||||
url(
|
path(
|
||||||
r"^autocomplete/registration$",
|
"autocomplete/registration", autocomplete, name="cof.registration.autocomplete"
|
||||||
autocomplete,
|
|
||||||
name="cof.registration.autocomplete",
|
|
||||||
),
|
),
|
||||||
url(
|
path(
|
||||||
r"^user/autocomplete$",
|
"user/autocomplete",
|
||||||
gestioncof_views.user_autocomplete,
|
gestioncof_views.user_autocomplete,
|
||||||
name="cof-user-autocomplete",
|
name="cof-user-autocomplete",
|
||||||
),
|
),
|
||||||
# Interface admin
|
# Interface admin
|
||||||
url(r"^admin/logout/", gestioncof_views.logout),
|
path("admin/logout/", gestioncof_views.logout),
|
||||||
url(r"^admin/doc/", include("django.contrib.admindocs.urls")),
|
path("admin/doc/", include("django.contrib.admindocs.urls")),
|
||||||
url(
|
path(
|
||||||
r"^admin/(?P<app_label>[\d\w]+)/(?P<model_name>[\d\w]+)/csv/",
|
"admin/<slug:app_label>/<slug:model_name>/csv/",
|
||||||
csv_views.admin_list_export,
|
csv_views.admin_list_export,
|
||||||
{"fields": ["username"]},
|
{"fields": ["username"]},
|
||||||
),
|
),
|
||||||
url(r"^admin/", include(admin.site.urls)),
|
path("admin/", admin.site.urls),
|
||||||
# Liens utiles du COF et du BdA
|
# Liens utiles du COF et du BdA
|
||||||
url(r"^utile_cof$", gestioncof_views.utile_cof, name="utile_cof"),
|
path("utile_cof", gestioncof_views.utile_cof, name="utile_cof"),
|
||||||
url(r"^utile_bda$", gestioncof_views.utile_bda, name="utile_bda"),
|
path("utile_bda", gestioncof_views.utile_bda, name="utile_bda"),
|
||||||
url(r"^utile_bda/bda_diff$", gestioncof_views.liste_bdadiff, name="ml_diffbda"),
|
path("utile_bda/bda_diff", gestioncof_views.liste_bdadiff, name="ml_diffbda"),
|
||||||
url(r"^utile_cof/diff_cof$", gestioncof_views.liste_diffcof, name="ml_diffcof"),
|
path("utile_cof/diff_cof", gestioncof_views.liste_diffcof, name="ml_diffcof"),
|
||||||
url(
|
path(
|
||||||
r"^utile_bda/bda_revente$",
|
"utile_bda/bda_revente",
|
||||||
gestioncof_views.liste_bdarevente,
|
gestioncof_views.liste_bdarevente,
|
||||||
name="ml_bda_revente",
|
name="ml_bda_revente",
|
||||||
),
|
),
|
||||||
url(r"^k-fet/", include("kfet.urls")),
|
path("k-fet/", include("kfet.urls")),
|
||||||
url(r"^cms/", include(wagtailadmin_urls)),
|
path("cms/", include(wagtailadmin_urls)),
|
||||||
url(r"^documents/", include(wagtaildocs_urls)),
|
path("documents/", include(wagtaildocs_urls)),
|
||||||
# djconfig
|
# djconfig
|
||||||
url(r"^config", gestioncof_views.ConfigUpdate.as_view(), name="config.edit"),
|
path("config", gestioncof_views.ConfigUpdate.as_view(), name="config.edit"),
|
||||||
]
|
]
|
||||||
|
|
||||||
if "debug_toolbar" in settings.INSTALLED_APPS:
|
if "debug_toolbar" in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
|
|
||||||
urlpatterns += [url(r"^__debug__/", include(debug_toolbar.urls))]
|
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
# Si on est en production, MEDIA_ROOT est servi par Apache.
|
# Si on est en production, MEDIA_ROOT est servi par Apache.
|
||||||
|
@ -137,5 +135,5 @@ if settings.DEBUG:
|
||||||
|
|
||||||
# Wagtail for uncatched
|
# Wagtail for uncatched
|
||||||
urlpatterns += i18n_patterns(
|
urlpatterns += i18n_patterns(
|
||||||
url(r"", include(wagtail_urls)), prefix_default_language=False
|
path("", include(wagtail_urls)), prefix_default_language=False
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue