-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_outside.py
More file actions
executable file
·88 lines (67 loc) · 2.33 KB
/
settings_outside.py
File metadata and controls
executable file
·88 lines (67 loc) · 2.33 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""
Django settings for QED project when oustide EPA network.
This setup assumes everything is being hosted on
the local machine or a publicly-accessible server.
NOTE: CTS SPARC calculator still won't work, it's only accessible within
the EPA network.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
from settings import *
import os
import logging
print('settings_outside.py')
# Get machine IP address
MACHINE_ID = "developer"
# Define ENVIRONMENTAL VARIABLES
os.environ.update({
'REST_SERVER_8': 'http://localhost:64399', # 'http://134.67.114.8'
'PROJECT_PATH': PROJECT_ROOT,
'SITE_SKIN': 'EPA', # Leave empty ('') for default skin, 'EPA' for EPA skin
'CONTACT_URL': 'https://www.epa.gov/research/forms/contact-us-about-epa-research',
})
DEBUG = True
NODEJS_HOST = 'localhost'
NODEJS_PORT = 4000
# SECURITY WARNING: don't run with debug turned on in production!
# DEBUG = False
DEBUG = True
TEMPLATE_DEBUG = False
if not os.environ.get('UBERTOOL_REST_SERVER'):
# Local REST server externally accessing intranet endpoints
os.environ.update({'UBERTOOL_REST_SERVER': 'http://localhost:7777'})
print("REST backend = http://localhost:7777")
# SECURITY WARNING: we keep the secret key in a shared dropbox directory
try:
with open('secrets/secret_key_django_dropbox.txt') as f:
SECRET_KEY = f.read().strip()
except IOError as e:
print("Could not find secret file")
down_low = 'Shhhhhhhhhhhhhhh'
SECRET_KEY = down_low
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1'
]
IS_PUBLIC = False
WSGI_APPLICATION = 'wsgi_local.application'
# Authentication
AUTH = False
LOGIN_URL = '/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
# if os.environ.get('PASSWORD_REQUIRED') == "True":
# logging.warning("Password protection enabled")
# MIDDLEWARE += ['login_middleware.RequireLoginMiddleware','django.contrib.messages.middleware.MessageMiddleware',]
# AUTH = True
# DEBUG = False
REQUIRE_LOGIN_PATH = '/login/'
# Log to console in Debug mode
if DEBUG:
import logging
logging.basicConfig(
level = logging.DEBUG,
format = '%(asctime)s %(levelname)s %(message)s',
)
logging.getLogger().setLevel(logging.INFO)