-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_settings.py
168 lines (145 loc) · 4.71 KB
/
local_settings.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# -*- coding: utf-8 -*-
import os
import geonode
# Setting debug to true makes Django serve static media and
# present pretty error pages.
DEBUG = TEMPLATE_DEBUG = False
# Set to True to load non-minified versions of (static) client dependencies
# Requires to set-up Node and tools that are required for static development
# otherwise it will raise errors for the missing non-minified dependencies
DEBUG_STATIC = False
SITENAME = 'GeoNode'
SITEURL = 'http://5.189.145.94/'
DATABASE_ENGINE = 'postgresql_psycopg2'
DATABASE_NAME = 'geonode'
DATABASE_USER = 'geonode'
DATABASE_PASSWORD = 'H6EnBrDM'
DATABASE_HOST = 'localhost'
DATABASE_PORT = '5432'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': DATABASE_NAME,
'USER': DATABASE_USER,
'PASSWORD': DATABASE_PASSWORD,
'HOST': DATABASE_HOST,
'PORT': DATABASE_PORT,
},
'datastore': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'geonode_data',
'USER': DATABASE_USER,
'PASSWORD': DATABASE_PASSWORD,
'HOST': DATABASE_HOST,
'PORT': DATABASE_PORT,
}
}
GEOSERVER_URL = SITEURL + 'geoserver/'
# OGC (WMS/WFS/WCS) Server Settings
OGC_SERVER = {
'default' : {
'BACKEND' : 'geonode.geoserver',
'LOCATION' : 'http://localhost:8080/geoserver/',
'PUBLIC_LOCATION' : GEOSERVER_URL,
'USER' : 'admin',
'PASSWORD' : 'geoserver',
'MAPFISH_PRINT_ENABLED' : True,
'PRINT_NG_ENABLED' : True,
'GEONODE_SECURITY_ENABLED' : True,
'GEOGIG_ENABLED' : False,
'WMST_ENABLED' : False,
'BACKEND_WRITE_ENABLED': True,
'WPS_ENABLED' : True,
'LOG_FILE':'/usr/share/geoserver/data/logs/geoserver.log',
# Set to name of database in DATABASES dictionary to enable
'DATASTORE': 'datastore',
}
}
LANGUAGE_CODE = 'en'
MEDIA_ROOT = '/var/www/geonode/uploaded'
STATIC_ROOT = '/var/www/geonode/static/'
# secret key used in hashing, should be a long, unique string for each
# site. See http://docs.djangoproject.com/en/1.2/ref/settings/#secret-key
SECRET_KEY = 's6mNTWAKfmaJCyCIIH'
CATALOGUE = {
'default': {
# The underlying CSW backend
# ("pycsw_http", "pycsw_local", "geonetwork", "deegree")
'ENGINE': 'geonode.catalogue.backends.pycsw_local',
# The FULLY QUALIFIED base url to the CSW instance for this GeoNode
'URL': '%scatalogue/csw' % SITEURL,
}
}
# A Google Maps API key is needed for the 3D Google Earth view of maps
# See http://code.google.com/apis/maps/signup.html
GOOGLE_API_KEY = ''
GEONODE_ROOT = os.path.dirname(geonode.__file__)
TEMPLATE_DIRS = (
'/etc/geonode/templates',
os.path.join(GEONODE_ROOT, 'templates'),
)
# Additional directories which hold static files
STATICFILES_DIRS = [
'/etc/geonode/media',
os.path.join(GEONODE_ROOT, 'static'),
]
MAP_BASELAYERS = [{
"source": {
"ptype": "gxp_wmscsource",
"url": GEOSERVER_URL + "wms",
"restUrl": "/gs/rest"
}
},{
"source": {"ptype": "gxp_olsource"},
"type":"OpenLayers.Layer",
"args":["No background"],
"visibility": False,
"fixed": True,
"group":"background"
}, {
"source": {"ptype": "gxp_olsource"},
"type":"OpenLayers.Layer.OSM",
"args":["OpenStreetMap"],
"visibility": False,
"fixed": True,
"group":"background"
}, {
"source": {"ptype": "gxp_mapquestsource"},
"name":"osm",
"group":"background",
"visibility": True
}, {
"source": {"ptype": "gxp_mapquestsource"},
"name":"naip",
"group":"background",
"visibility": False
}, {
"source": {"ptype": "gxp_bingsource"},
"name": "AerialWithLabels",
"fixed": True,
"visibility": False,
"group":"background"
},{
"source": {"ptype": "gxp_mapboxsource"},
}
]
#REGISTRATION_OPEN = False
#ACCOUNT_APPROVAL_REQUIRED = False
#ACCOUNT_EMAIL_CONFIRMATION_EMAIL = False
#ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False
# Allowed values for the preview library are 'geoext' and 'leaflet'.
#LAYER_PREVIEW_LIBRARY = 'geoext'
# Uncomment the following to receive emails whenever there are errors in GeoNode
# or to be notified of new user requests when ACCOUNT_APPROVAL_REQUIRED has been set.
#ADMINS = (
# ('John', 'john@example.com'),
# )
# Uncomment the following to use a Gmail account as the email backend
#EMAIL_USE_TLS = True
#EMAIL_HOST = 'smtp.gmail.com'
#EMAIL_HOST_USER = 'youremail@gmail.com'
#EMAIL_HOST_PASSWORD = 'yourpassword'
#EMAIL_PORT = 587
# For more information on available settings please consult the Django docs at
# https://docs.djangoproject.com/en/dev/ref/settings
ALLOWED_HOSTS=['localhost', '5.189.145.94', 'geonode.ocharowca.info']