1#!/usr/bin/env python3
 2
 3"""Standard Django file to map misc URLs to functions."""
 4
 5# Standard URLs map for projects which don't need to define their own
 6
 7from django.urls import path
 8from django.urls import include
 9
10from chart.project import settings
11
12urlpatterns = [
13    # Misc web
14    path('', include('chart.web.urls')),
15
16    # Report viewer
17    path('reports/', include('chart.reportviewer.urls')),
18
19    # Event viewer 2
20    path('eventviewer/', include('chart.eventviewer2.urls')),
21
22    # Plot tool
23    path('plots/', include('chart.plotviewer.urls')),
24
25    # Widgets gallery
26    path('widgets/', include('chart.widgets.urls')),
27
28    # Event classes
29    path('events/', include('chart.events.urls')),
30
31    # Database model object viewer
32    path('db/', include('chart.db.urls')),
33
34    # Time converter tool
35    path('timeconv/', include('chart.timeconv.urls')),
36
37    # New API access
38    path('api2/', include('chart.api2.urls')),
39
40    # CHART-REST for CDAT
41    path('rest', include('chart_rest.urls'))
42]
43
44if not settings.LOCKDOWN_RESTRICTED_ACCESS:
45    urlpatterns += [
46        # Constants page
47        path('', include('chart.alg.urls')),
48
49        # Various backend (activities and scheduling) pages
50        path('', include('chart.backend.urls')),
51
52        # Report templates
53        path('templates/', include('chart.reports.urls')),
54
55        # Job viewer
56        path('jobviewer/', include('chart.jobviewer.urls')),
57
58        # XML schemas
59        path('schemas/', include('chart.schemas.urls')),
60
61        # File viewer
62        path('browse/', include('chart.browse.urls')),
63
64        # Django admin page
65        # path('admin/', include(admin.site.urls)),
66]
67
68if settings.DEBUG:
69    # if DEBUG is enabled then we serve static pages in addition to dynamic pages
70    # normally static files are served via separate web server
71    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
72    urlpatterns += staticfiles_urlpatterns()