urls.py
2.22 KB
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
"""pyros URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
# Django imports
from django.contrib import admin
from django.conf import settings
from django.urls import include, path # For django versions from 2.0 and up
from django.conf.urls.static import static
# Project imports
import dashboard
'''
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
'''
urlpatterns = [
path('admin/', admin.site.urls),
path('user_mgmt/', include('user_mgmt.urls')),
path('dashboard/', include('dashboard.urls')),
path('devices/', include('devices.urls')),
path('scheduling/', include('scheduling.urls')),
path('alert_mgmt/', include('alert_mgmt.urls')),
path('analyzer/', include('analyzer.urls')),
path('majordome/', include('majordome.urls')),
path('env_monitor/', include('env_monitor.urls')),
path('observation_manager/', include('observation_manager.urls')),
path('scp_mgmt/', include('scp_mgmt.urls')),
path('seq_submit/', include('seq_submit.urls')),
path('obs_config/', include('obs_config.urls')),
path('api/', include('api.urls')),
path('', dashboard.views.index)
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
#urlpatterns += [path("silk/", include("silk.urls", namespace="silk"))]
if settings.DEBUG:
import debug_toolbar
# urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls)))
urlpatterns.append(
path('__debug__/', include(debug_toolbar.urls))
)
'''
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
# For django versions before 2.0:
# url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
'''