Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #DATABASE_URL = os.getenv(
- # 'DATABASE_URL',
- # 'sqlite:///{path}'.format(
- # path=os.path.join(PROJECT_ROOT, 'development.db')
- # )
- #)
- # DATABASE_URL = 'postgresql://test_geonode:test_geonode@localhost:5432/geonode'
- DATABASE_URL = 'postgresql://geonode:geonode@localhost:5432/geonode'
- # Defines settings for development
- # since GeoDjango is in use, you should use gis-enabled engine, for example:
- # 'ENGINE': 'django.contrib.gis.db.backends.postgis'
- # see https://docs.djangoproject.com/en/1.8/ref/contrib/gis/db-api/#module-django.contrib.gis.db.backends for
- # detailed list of supported backends and notes.
- _db_conf = dj_database_url.parse(DATABASE_URL, conn_max_age=5)
- if 'spatialite' in DATABASE_URL:
- SPATIALITE_LIBRARY_PATH = 'mod_spatialite.so'
- if 'CONN_TOUT' in _db_conf:
- _db_conf['CONN_TOUT'] = 5
- if 'postgresql' in DATABASE_URL or 'postgis' in DATABASE_URL:
- if 'OPTIONS' not in _db_conf:
- _db_conf['OPTIONS'] = {}
- _db_conf['OPTIONS'].update({
- 'connect_timeout': 5,
- })
- DATABASES = {
- 'default': _db_conf
- #'postgis://geonode:geonode@localhost:5432/geonode_data': _db_conf
- }
- if os.getenv('DEFAULT_BACKEND_DATASTORE'):
- GEODATABASE_URL = os.getenv('GEODATABASE_URL',
- 'postgis://geonode:geonode@localhost:5432/geonode_data')
- DATABASES[os.getenv('DEFAULT_BACKEND_DATASTORE')] = dj_database_url.parse(
- GEODATABASE_URL, conn_max_age=5
- )
- _geo_db = DATABASES[os.getenv('DEFAULT_BACKEND_DATASTORE')]
- if 'CONN_TOUT' in DATABASES['default']:
- _geo_db['CONN_TOUT'] = 5
- if 'postgresql' in GEODATABASE_URL or 'postgis' in GEODATABASE_URL:
- _geo_db['OPTIONS'] = DATABASES['default']['OPTIONS'] if 'OPTIONS' in DATABASES['default'] else {}
- _geo_db['OPTIONS'].update({
- 'connect_timeout': 5,
- })
- DATABASES[os.getenv('DEFAULT_BACKEND_DATASTORE')] = _geo_db
- ....
- OGC_SERVER = {
- 'default': {
- 'BACKEND': 'geonode.geoserver',
- 'LOCATION': 'http://geothoponode2.igg.cnr.it:8080/geoserver2', #GEOSERVER_LOCATION,
- 'WEB_UI_LOCATION': 'http://geothoponode2.igg.cnr.it:8080/geoserver2', #GEOSERVER_WEB_UI_LOCATION,
- 'LOGIN_ENDPOINT': 'j_spring_oauth2_geonode_login',
- 'LOGOUT_ENDPOINT': 'j_spring_oauth2_geonode_logout',
- # PUBLIC_LOCATION needs to be kept like this because in dev mode
- # the proxy won't work and the integration tests will fail
- # the entire block has to be overridden in the local_settings
- 'PUBLIC_LOCATION': 'http://geothoponode2.igg.cnr.it:8080/geoserver2', #GEOSERVER_PUBLIC_LOCATION,
- 'USER': 'admin', #OGC_SERVER_DEFAULT_USER,
- 'PASSWORD': 'geoserver', #OGC_SERVER_DEFAULT_PASSWORD,
- 'MAPFISH_PRINT_ENABLED': ast.literal_eval(os.getenv('MAPFISH_PRINT_ENABLED', 'True')),
- 'PRINT_NG_ENABLED': ast.literal_eval(os.getenv('PRINT_NG_ENABLED', 'True')),
- 'GEONODE_SECURITY_ENABLED': ast.literal_eval(os.getenv('GEONODE_SECURITY_ENABLED', 'True')),
- 'GEOFENCE_SECURITY_ENABLED': GEOFENCE_SECURITY_ENABLED,
- 'GEOFENCE_URL': os.getenv('GEOFENCE_URL', 'internal:/'),
- 'WMST_ENABLED': ast.literal_eval(os.getenv('WMST_ENABLED', 'False')),
- 'BACKEND_WRITE_ENABLED': ast.literal_eval(os.getenv('BACKEND_WRITE_ENABLED', 'True')),
- 'WPS_ENABLED': ast.literal_eval(os.getenv('WPS_ENABLED', 'True')),
- 'LOG_FILE': '%s/geoserver2/data/logs/geoserver.log'
- % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),
- # Set to name of database in DATABASES dictionary to enable
- # 'datastore',
- 'DATASTORE': 'postgis://geonode:geonode@localhost:5432/geonode_data', 'repoigg' #os.getenv('DEFAULT_BACKEND_DATASTORE', ''),
- 'TIMEOUT': int(os.getenv('OGC_REQUEST_TIMEOUT', '10')),
- 'MAX_RETRIES': int(os.getenv('OGC_REQUEST_MAX_RETRIES', '3')),
- 'BACKOFF_FACTOR': float(os.getenv('OGC_REQUEST_BACKOFF_FACTOR', '0.3')),
- 'POOL_MAXSIZE': int(os.getenv('OGC_REQUEST_POOL_MAXSIZE', '10')),
- 'POOL_CONNECTIONS': int(os.getenv('OGC_REQUEST_POOL_CONNECTIONS', '10')),
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement