-
Notifications
You must be signed in to change notification settings - Fork 4
/
urls.py
72 lines (62 loc) · 2.21 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""
Tamato URL Configuration.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.contrib import admin
from django.urls import include
from django.urls import path
import common
urlpatterns = [
path("", include("common.urls")),
path("", include("additional_codes.urls")),
path("", include("certificates.urls")),
path("", include("commodities.urls")),
path("", include("exporter.urls")),
path("", include("footnotes.urls")),
path("", include("geo_areas.urls")),
path("", include("importer.urls")),
path("", include("measures.urls")),
path("", include("publishing.urls", namespace="publishing")),
path("", include("quotas.urls")),
path("", include("regulations.urls")),
path("", include("reports.urls")),
path("", include("taric_parsers.urls")),
path("", include("workbaskets.urls", namespace="workbaskets")),
path("", include("reference_documents.urls", namespace="reference_documents")),
]
if not settings.MAINTENANCE_MODE:
urlpatterns += {
path("admin/", admin.site.urls),
}
handler403 = "common.views.handler403"
handler500 = "common.views.handler500"
if settings.DEBUG:
urlpatterns += [
path("403/", common.views.handler403, name="handler403"),
path("500/", common.views.handler500, name="handler500"),
]
if settings.SSO_ENABLED:
urlpatterns = [
path(
"auth/",
include(
"authbroker_client.urls",
),
),
*urlpatterns,
]
if "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns = [path("__debug__/", include(debug_toolbar.urls)), *urlpatterns]