mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
django2.2: fix urls and adapt them to new format
This commit is contained in:
parent
12b6f0d488
commit
df531198c9
@ -50,7 +50,7 @@ router.register(
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# API
|
# API
|
||||||
re_path(r"^", include(router.urls)),
|
re_path(r"^", include(router.urls)),
|
||||||
re_path(r"^login/", include("rest_framework.re_paths", namespace="rest_framework")),
|
re_path(r"^login/", include("rest_framework.urls", namespace="rest_framework")),
|
||||||
re_path(r"^markdown$", RenderMarkdown, name="api_markdown"),
|
re_path(r"^markdown$", RenderMarkdown, name="api_markdown"),
|
||||||
re_path(r"^mailings$", FetchMailingLists, name="mailings_fetch"),
|
re_path(r"^mailings$", FetchMailingLists, name="mailings_fetch"),
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@ from django.views.generic import (
|
|||||||
from django.utils import html
|
from django.utils import html
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
|
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
|
||||||
from django.core.urlresolvers import reverse_lazy, reverse
|
from django.urls import reverse_lazy, reverse
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
66
sith/urls.py
66
sith/urls.py
@ -39,9 +39,9 @@ Including another URLconf
|
|||||||
"""
|
"""
|
||||||
from django.urls import include, re_path
|
from django.urls import include, re_path
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls.static import static
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.views.i18n import javascript_catalog
|
from django.conf.urls.static import static
|
||||||
|
from django.views.i18n import JavaScriptCatalog
|
||||||
from ajax_select import urls as ajax_select_urls
|
from ajax_select import urls as ajax_select_urls
|
||||||
|
|
||||||
js_info_dict = {"packages": ("sith",)}
|
js_info_dict = {"packages": ("sith",)}
|
||||||
@ -51,61 +51,43 @@ handler404 = "core.views.not_found"
|
|||||||
handler500 = "core.views.internal_servor_error"
|
handler500 = "core.views.internal_servor_error"
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
re_path(r"^", include("core.re_paths", namespace="core", app_name="core")),
|
re_path(r"^", include(("core.urls", "core"), namespace="core")),
|
||||||
re_path(
|
re_path(
|
||||||
r"^rootplace/",
|
r"^rootplace/", include(("rootplace.urls", "rootplace"), namespace="rootplace")
|
||||||
include("rootplace.re_paths", namespace="rootplace", app_name="rootplace"),
|
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
r"^subscription/",
|
r"^subscription/",
|
||||||
include(
|
include(("subscription.urls", "subscription"), namespace="subscription"),
|
||||||
"subscription.re_paths", namespace="subscription", app_name="subscription"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
re_path(r"^com/", include("com.re_paths", namespace="com", app_name="com")),
|
re_path(r"^com/", include(("com.urls", "com"), namespace="com")),
|
||||||
re_path(r"^club/", include("club.re_paths", namespace="club", app_name="club")),
|
re_path(r"^club/", include(("club.urls", "club"), namespace="club")),
|
||||||
re_path(
|
re_path(r"^counter/", include(("counter.urls", "counter"), namespace="counter")),
|
||||||
r"^counter/",
|
re_path(r"^stock/", include(("stock.urls", "stock"), namespace="stock")),
|
||||||
include("counter.re_paths", namespace="counter", app_name="counter"),
|
|
||||||
),
|
|
||||||
re_path(r"^stock/", include("stock.re_paths", namespace="stock", app_name="stock")),
|
|
||||||
re_path(
|
re_path(
|
||||||
r"^accounting/",
|
r"^accounting/",
|
||||||
include("accounting.re_paths", namespace="accounting", app_name="accounting"),
|
include(("accounting.urls", "accounting"), namespace="accounting"),
|
||||||
),
|
|
||||||
re_path(
|
|
||||||
r"^eboutic/",
|
|
||||||
include("eboutic.re_paths", namespace="eboutic", app_name="eboutic"),
|
|
||||||
),
|
),
|
||||||
|
re_path(r"^eboutic/", include(("eboutic.urls", "eboutic"), namespace="eboutic")),
|
||||||
re_path(
|
re_path(
|
||||||
r"^launderette/",
|
r"^launderette/",
|
||||||
include(
|
include(("launderette.urls", "launderette"), namespace="launderette"),
|
||||||
"launderette.re_paths", namespace="launderette", app_name="launderette"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
re_path(r"^sas/", include("sas.re_paths", namespace="sas", app_name="sas")),
|
re_path(r"^sas/", include(("sas.urls", "sas"), namespace="sas")),
|
||||||
re_path(r"^api/v1/", include("api.re_paths", namespace="api", app_name="api")),
|
re_path(r"^api/v1/", include(("api.urls", "api"), namespace="api")),
|
||||||
re_path(
|
re_path(
|
||||||
r"^election/",
|
r"^election/", include(("election.urls", "election"), namespace="election")
|
||||||
include("election.re_paths", namespace="election", app_name="election"),
|
|
||||||
),
|
),
|
||||||
re_path(r"^forum/", include("forum.re_paths", namespace="forum", app_name="forum")),
|
re_path(r"^forum/", include(("forum.urls", "forum"), namespace="forum")),
|
||||||
|
re_path(r"^trombi/", include(("trombi.urls", "trombi"), namespace="trombi")),
|
||||||
|
re_path(r"^matmatronch/", include(("matmat.urls", "matmat"), namespace="matmat")),
|
||||||
re_path(
|
re_path(
|
||||||
r"^trombi/", include("trombi.re_paths", namespace="trombi", app_name="trombi")
|
r"^pedagogy/", include(("pedagogy.urls", "pedagogy"), namespace="pedagogy")
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(r"^admin/", admin.site.urls),
|
||||||
r"^matmatronch/",
|
re_path(r"^ajax_select/", include(ajax_select_urls)),
|
||||||
include("matmat.re_paths", namespace="matmat", app_name="matmat"),
|
re_path(r"^i18n/", include("django.conf.urls.i18n")),
|
||||||
),
|
re_path(r"^jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalog"),
|
||||||
re_path(
|
re_path(r"^captcha/", include("captcha.urls")),
|
||||||
r"^pedagogy/",
|
|
||||||
include("pedagogy.re_paths", namespace="pedagogy", app_name="pedagogy"),
|
|
||||||
),
|
|
||||||
re_path(r"^admin/", include(admin.site.re_paths)),
|
|
||||||
re_path(r"^ajax_select/", include(ajax_select_re_paths)),
|
|
||||||
re_path(r"^i18n/", include("django.urls.i18n")),
|
|
||||||
re_path(r"^jsi18n/$", javascript_catalog, js_info_dict, name="javascript-catalog"),
|
|
||||||
re_path(r"^captcha/", include("captcha.re_paths")),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
Loading…
Reference in New Issue
Block a user