1#!/usr/bin/env python3
2
3"""Standard Django file to map from URLs to implementation functions."""
4
5from django.urls import path
6from django.urls import include
7from django.views.generic import TemplateView
8
9from chart.project import settings
10import chartepssg.homepage.views
11
12handler500 = 'chart.web.views.error500'
13
14prefix = settings.PREFIX
15
16urlpatterns = [
17 # Project menu
18 path(prefix, include('chartepssg.homepage.urls')),
19
20 # Standard URLs for core functionality (user management, core css, error pages)
21 path(prefix, include('chart.urls')),
22
23
24]
25
26# URLs can be blocked for external users
27# if not settings.LOCKDOWN_RESTRICTED_ACCESS:
28 # urlpatterns += [
29 # ]
30
31# This should not be needed because chart.urls has the same code
32# But debug static retrievals all fail if it's missing
33
34if settings.DEBUG:
35 # if DEBUG is enabled then we serve static pages in addition to dynamic pages
36 # normally static files are served via separate web server
37 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
38 urlpatterns += staticfiles_urlpatterns()