· 6 years ago · Mar 28, 2020, 06:18 AM
1import os
2
3PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
4
5SITEURL = "http://localhost/"
6
7DATABASES = {
8 "default": {
9 "ENGINE": "django.db.backends.postgresql_psycopg2",
10 "NAME": "geonode",
11 "USER": "geonode",
12 "PASSWORD": "geonode",
13 "HOST" : "localhost",
14 "PORT" : "5454",
15 },
16 # vector datastore for uploads
17 "datastore" : {
18 "ENGINE": "django.contrib.gis.db.backends.postgis",
19 "NAME": "geonode_imports",
20 "USER" : "geonode",
21 "PASSWORD" : "geonode",
22 "HOST" : "localhost",
23 "PORT" : "5454",
24 }
25}
26
27# OGC (WMS/WFS/WCS) Server Settings
28# OGC (WMS/WFS/WCS) Server Settings
29OGC_SERVER = {
30 "default": {
31 "BACKEND": "geonode.geoserver",
32 "LOCATION": "http://localhost:8080/geoserver/",
33 "PUBLIC_LOCATION": "http://localhost/geoserver/",
34 "USER": "admin",
35 "PASSWORD": "geoserver",
36 "MAPFISH_PRINT_ENABLED": True,
37 "PRINT_NG_ENABLED": True,
38 "GEONODE_SECURITY_ENABLED": True,
39 "GEOGIG_ENABLED": False,
40 "WMST_ENABLED": False,
41 "BACKEND_WRITE_ENABLED": True,
42 "WPS_ENABLED": False,
43 "LOG_FILE": "%s/geoserver/data/logs/geoserver.log" % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),
44 # Set to name of database in DATABASES dictionary to enable
45 "DATASTORE": "datastore",
46 "TIMEOUT": 10 # number of seconds to allow for HTTP requests
47 }
48}
49
50MAP_BASELAYERS = [{
51 "source": {"ptype": "gxp_olsource"},
52 "type": "OpenLayers.Layer",
53 "args": ["No background"],
54 "visibility": False,
55 "fixed": True,
56 "group":"background"
57}, {
58 "source": {"ptype": "gxp_osmsource"},
59 "type": "OpenLayers.Layer.OSM",
60 "name": "mapnik",
61 "visibility": True,
62 "fixed": True,
63 "group": "background"
64}, {
65 "source": {"ptype": "gxp_bingsource",
66 "apiKey": 'UEHn2pM3zwY4zZWhD9Lk~HjxfugiYQUhefpzEmenDaQ~AjzBr4vrfaS3yOu9P3PtZ8k-LnzRwd2c8H85Czk9d0GLK-X_nw393KXIO7_q1Or2'
67 },
68 "name": "Aerial",
69 "visibility": True,
70 "fixed": True,
71 "group": "background"
72}, {
73 "source": {"ptype": "gxp_googlesource",
74 "apiKey": "AIzaSyDVPqNb2D2f9-AmtENeUF5VsC3Iq6EGIX0",
75 },
76 "name": "SATELLITE",
77 "visibility": False,
78 "fixed": True,
79 "group": "background"
80}]
81
82# A Google Maps API key is needed for the 3D Google Earth view of maps
83# See http://code.google.com/apis/maps/signup.html
84GOOGLE_API_KEY = 'AIzaSyDVPqNb2D2f9-AmtENeUF5VsC3Iq6EGIX0'
85
86REGISTRATION_OPEN = False
87ACCOUNT_APPROVAL_REQUIRED = False
88
89#ACCOUNT_EMAIL_CONFIRMATION_EMAIL = False
90#ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False
91
92# Allowed values for the preview library are 'geoext' and 'leaflet'.
93LAYER_PREVIEW_LIBRARY = 'geoext'
94
95# Uncomment the following to receive emails whenever there are errors in GeoNode
96# or to be notified of new user requests when ACCOUNT_APPROVAL_REQUIRED has been set.
97#ADMINS = (
98# ('John', 'john@example.com'),
99# )
100
101# Uncomment the following to use a Gmail account as the email backend
102EMAIL_USE_TLS = False
103EMAIL_HOST = 'smtp.gmail.com'
104EMAIL_HOST_USER = 'noname@gmail.com'
105EMAIL_HOST_PASSWORD = '123'
106EMAIL_PORT = 587