Skip to content

Instantly share code, notes, and snippets.

@ingenieroariel
Forked from evocati357/gist:3699710
Created September 11, 2012 16:39
Show Gist options
  • Save ingenieroariel/3699732 to your computer and use it in GitHub Desktop.
Save ingenieroariel/3699732 to your computer and use it in GitHub Desktop.
import os
import geonode
DEBUG = TEMPLATE_DEBUG = False
MINIFIED_RESOURCES = True
SERVE_MEDIA=False
SITENAME = 'GeoNode'
SITEURL = 'http://geonode.gov.vc/'
DATABASE_ENGINE = 'postgresql_psycopg2'
DATABASE_NAME = 'geonode'
DATABASE_USER = 'geonode'
DATABASE_PASSWORD = 'zdYM1dnR'
DATABASE_HOST = 'localhost'
DATABASE_PORT = '5432'
# Make geonode upload vector layers directly to postgis
DB_DATASTORE_NAME = 'postgres_imports'
DB_DATASTORE_DATABASE = DATABASE_NAME
DB_DATASTORE_USER = DATABASE_USER
DB_DATASTORE_PASSWORD = DATABASE_PASSWORD
DB_DATASTORE_HOST = DATABASE_HOST
DB_DATASTORE_PORT = DATABASE_PORT
DB_DATASTORE_TYPE='postgis'
# Django 1.3 compatibility
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': DATABASE_NAME,
'USER': DATABASE_USER,
'PASSWORD': DATABASE_PASSWORD,
'HOST': DATABASE_HOST,
'PORT': DATABASE_PORT,
}
}
DB_DATASTORE=True
LANGUAGE_CODE = 'en'
MEDIA_ROOT = '/var/www/geonode/uploaded'
MEDIA_URL = '/uploaded/'
STATIC_ROOT = '/var/www/geonode/static/'
STATIC_URL = '/static/'
GEONODE_UPLOAD_PATH = MEDIA_ROOT + 'geonode'
GEONODE_CLIENT_LOCATION = STATIC_URL + 'geonode/'
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
STATICFILES_STORAGE = 'staticfiles.storage.StaticFilesStorage'
# 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 = 'XytIi9UHqoIEy4Drmt'
# The FULLY QUALIFIED url to the GeoServer instance for this GeoNode.
GEOSERVER_BASE_URL = SITEURL + 'geoserver/'
# The FULLY QUALIFIED url to the GeoNetwork instance for this GeoNode
GEONETWORK_BASE_URL = SITEURL + 'geonetwork/'
# The username and password for a user with write access to GeoNetwork
GEONETWORK_CREDENTIALS = 'admin', 'admin'
GEOSERVER_CREDENTIALS = 'geoserver', 'pJ5Fhl5A'
# 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 = ''
DEFAULT_LAYERS_OWNER='admin'
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, 'media'),
]
# Uncomment the following to receive emails whenever there are errors in GeoNode
#ADMINS = (
# ('John', '[email protected]'),
# )
# Uncomment the following to use a Gmail account as the email backend
#EMAIL_USE_TLS = True
#EMAIL_HOST = 'smtp.gmail.com'
#EMAIL_HOST_USER = '[email protected]'
#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
import logging
_logger = logging.getLogger('geonode.maps')
_logger.addHandler(logging.StreamHandler())
# available levels: DEBUG, INFO, WARNING, ERROR, CRITICAL.
# The earlier a level appears in this list, the more output it will produce in the log file.
_logger.setLevel(logging.WARNING)
GOOGLE_API_KEY = "ABQIAAAAkofooZxTfcCv9Wi3zzGTVxTnme5EwnLVtEDGnh-lFVzRJhbdQhQgAhB1eT_2muZtc0dl-ZSWrtzmrw"
MAP_BASELAYERS = [{
"source": {"ptype": "gx_olsource"},
"type":"OpenLayers.Layer",
"args":["No background"],
"visibility": False,
"fixed": True,
"group":"background"
},{
"source": { "ptype":"gx_olsource"},
"type":"OpenLayers.Layer.OSM",
"args":["OpenStreetMap"],
"visibility": True,
"fixed": True,
"group":"background"
},{
"source": {
"ptype":"gxp_googlesource",
"apiKey": GOOGLE_API_KEY
},
"group":"background",
"name":"SATELLITE",
"visibility": False,
"fixed": True,
},{
"source": {"ptype":"gx_olsource"},
"type":"OpenLayers.Layer.WMS",
"group":"background",
"visibility": False,
"fixed": True,
"args":[
"bluemarble",
"http://maps.opengeo.org/geowebcache/service/wms",
{
"layers":["bluemarble"],
"format":"image/png",
"tiled": True,
"tilesOrigin":[-20037508.34,-20037508.34]
},
{"buffer":0}
]
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment