<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi ZiZi,<div>in order to make geonode_generic able to use your custom settings, you will need basically to do a couple of things:</div><div><br></div><div>1. Create a "settings_local.py" or "local_settings.py" or "whatever_settings.py" by looking at the structure of this sample here <a href="https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/local_settings.py.sample">https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/local_settings.py.sample</a></div><div>It is worth notice that you need to import the original settings at the beginning ( <a href="https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/local_settings.py.sample#L22">https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/local_settings.py.sample#L22</a> ) and then override/add any other property you need.</div><div><br></div><div>2. Make sure you have defined the environment variable "<span style="background-color:rgb(255,251,221);color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">DJANGO_SETTINGS_MODULE</span>" with the value</div><div><br></div><div>DJANGO_SETTINGS_MODULE = "geonode_generic.whatever_settings  "<br></div><div><br></div><div>The WSGI module will look for this env variable definition and if it does not find it, it will fallback to "geonode.settings"</div><div><br></div><div>See as an instance: <a href="https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/wsgi.py#L38">https://github.com/geosolutions-it/geonode-generic/blob/master/geonode_generic/wsgi.py#L38</a></div><div><br></div><div><br></div><div>Hope this helps.</div><div><br></div><div>Cheers,</div><div>Alessio.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mar 2 ott 2018 alle ore 09:55 Zizi Jama <<a href="mailto:mazizi.jama@gmail.com">mazizi.jama@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div dir="auto"><br></div><div dir="auto">I have a geonode deployment based on <a href="https://github.com/geosolutions-it/geonode-generic" target="_blank">https://github.com/geosolutions-it/geonode-generic<br></a></div><div>This is running on my local machine.</div><div><br></div><div dir="auto">I want to add additional basemaps - according to geonode documentation it is recommended that one edits settings_local.py</div><div dir="auto"><br></div><div dir="auto">Is this the correct approach in this instance?</div><div dir="auto"><br></div><div dir="auto">Since
 I am using containers is it recommended to use docker volume in order 
to persist changes without having to create own image? (This is because on restart the changes to settings_local.py)</div><div dir="auto"><br></div><div>My <a href="http://settings.local.py" target="_blank">settings.local.py</a> looks like this (is it configured properly? These are not reflecting in my setup even after restarting the services. Any ideas what could be wrong?<br></div><div><br></div><div># -*- coding: utf-8 -*-<br>#########################################################################<br>#<br># Copyright (C) 2018 OSGeo<br>#<br># This program is free software: you can redistribute it and/or modify<br># it under the terms of the GNU General Public License as published by<br># the Free Software Foundation, either version 3 of the License, or<br># (at your option) any later version.<br>#<br># This program is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY; without even the implied warranty of<br># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br># along with this program. If not, see <<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>>.<br>#<br>#########################################################################<br><br>#import ast<br>#import os<br>#from urlparse import urlparse, urlunparse<br>from geonode.settings import *<br><br># default map projection<br># Note: If set to EPSG:4326, then only EPSG:4326 basemaps will work.<br>DEFAULT_MAP_CRS = "EPSG:3857"<br><br>DEFAULT_LAYER_FORMAT = "image/png"<br><br># Where should newly created maps be focused?<br>DEFAULT_MAP_CENTER = (0,0)<br><br># How tightly zoomed should newly created maps be?<br># 0 = entire world;<br># maximum zoom is between 12 and 15 (for Google Maps, coverage varies by area)<br>DEFAULT_MAP_ZOOM = 11<br><br>ALT_OSM_BASEMAPS = os.environ.get('ALT_OSM_BASEMAPS', False)<br>CARTODB_BASEMAPS = os.environ.get('CARTODB_BASEMAPS', False)<br>STAMEN_BASEMAPS = os.environ.get('STAMEN_BASEMAPS', False)<br>THUNDERFOREST_BASEMAPS = os.environ.get('THUNDERFOREST_BASEMAPS', False)<br>MAPBOX_ACCESS_TOKEN = os.environ.get('MAPBOX_ACCESS_TOKEN', '')<br>BING_API_KEY = os.environ.get('xjxjjxjxjxjjxjxjxjjxjxjxjxjxjxjxjxj_', None)<br>GOOGLE_API_KEY = os.environ.get('sisosopspsppspspsppsss', None)<br><br>MAP_BASELAYERS = [{<br>    "source": {"ptype": "gxp_olsource"},<br>    "type": "OpenLayers.Layer",<br>    "args": ["No background"],<br>    "name": "background",<br>    "visibility": False,<br>    "fixed": True,<br>    "group":"background"<br>#}, {<br>#    "source": {"ptype": "gxp_olsource"},<br>#    "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>#    "title": "UNESCO",<br>#    "args": ["UNESCO", "<a href="http://en.unesco.org/tiles/$%7Bz%7D/$%7Bx%7D/$%7By%7D.png" target="_blank">http://en.unesco.org/tiles/${z}/${x}/${y}.png</a>"],<br>#    "wrapDateLine": True,<br>#    "name": "background",<br>#    "attribution": "&copy; UNESCO",<br>#    "visibility": False,<br>#    "fixed": True,<br>#    "group":"background"<br>#}, {<br>#    "source": {"ptype": "gxp_olsource"},<br>#    "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>#    "title": "UNESCO GEODATA",<br>#    "args": ["UNESCO GEODATA", "<a href="http://en.unesco.org/tiles/geodata/$%7Bz%7D/$%7Bx%7D/$%7By%7D.png" target="_blank">http://en.unesco.org/tiles/geodata/${z}/${x}/${y}.png</a>"],<br>#    "name": "background",<br>#    "attribution": "&copy; UNESCO",<br>#    "visibility": False,<br>#    "wrapDateLine": True,<br>#    "fixed": True,<br>#    "group":"background"<br>#}, {<br>#    "source": {"ptype": "gxp_olsource"},<br>#    "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>#    "title": "Humanitarian OpenStreetMap",<br>#    "args": ["Humanitarian OpenStreetMap", "<a href="http://a.tile.openstreetmap.fr/hot/$%7Bz%7D/$%7Bx%7D/$%7By%7D.png" target="_blank">http://a.tile.openstreetmap.fr/hot/${z}/${x}/${y}.png</a>"],<br>#    "name": "background",<br>#    "attribution": "&copy; <a href='<a href="http://www.openstreetmap.org/copyright" target="_blank">http://www.openstreetmap.org/copyright</a>'>OpenStreetMap</a>, Tiles courtesy of <a href='<a href="http://hot.openstreetmap.org/" target="_blank">http://hot.openstreetmap.org/</a>' target='_blank'>Humanitarian OpenStreetMap Team</a>",<br>#    "visibility": False,<br>#    "wrapDateLine": True,<br>#    "fixed": True,<br>#    "group":"background"<br># }, {<br>#     "source": {"ptype": "gxp_olsource"},<br>#     "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>#     "title": "MapBox Satellite Streets",<br>#     "args": ["MapBox Satellite Streets", "<a href="http://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/$%7Bz%7D/$%7Bx%7D/$%7By%7D?access_token=" target="_blank">http://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/${z}/${x}/${y}?access_token=</a>"+MAPBOX_ACCESS_TOKEN],<br>#     "name": "background",<br>#     "attribution": "&copy; <a href='<a href="https://www.mapbox.com/about/maps/" target="_blank">https://www.mapbox.com/about/maps/</a>'>Mapbox</a> &copy; <a href='<a href="http://www.openstreetmap.org/copyright" target="_blank">http://www.openstreetmap.org/copyright</a>'>OpenStreetMap</a> <a href='<a href="https://www.mapbox.com/feedback/" target="_blank">https://www.mapbox.com/feedback/</a>' target='_blank'>Improve this map</a>",<br>#     "visibility": False,<br>#     "wrapDateLine": True,<br>#     "fixed": True,<br>#     "group":"background"<br># }, {<br>#     "source": {"ptype": "gxp_olsource"},<br>#     "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>#     "title": "MapBox Streets",<br>#     "args": ["MapBox Streets", "<a href="http://api.mapbox.com/styles/v1/mapbox/streets-v9/tiles/$%7Bz%7D/$%7Bx%7D/$%7By%7D?access_token=" target="_blank">http://api.mapbox.com/styles/v1/mapbox/streets-v9/tiles/${z}/${x}/${y}?access_token=</a>"+MAPBOX_ACCESS_TOKEN],<br>#     "name": "background",<br>#     "attribution": "&copy; <a href='<a href="https://www.mapbox.com/about/maps/" target="_blank">https://www.mapbox.com/about/maps/</a>'>Mapbox</a> &copy; <a href='<a href="http://www.openstreetmap.org/copyright" target="_blank">http://www.openstreetmap.org/copyright</a>'>OpenStreetMap</a> <a href='<a href="https://www.mapbox.com/feedback/" target="_blank">https://www.mapbox.com/feedback/</a>' target='_blank'>Improve this map</a>",<br>#     "visibility": False,<br>#     "wrapDateLine": True,<br>#     "fixed": True,<br>#     "group":"background"<br>}, {<br>    "source": {"ptype": "gxp_osmsource"},<br>    "type": "OpenLayers.Layer.OSM",<br>    "title": "OpenStreetMap",<br>    "name": "mapnik",<br>    "attribution": "&copy; <a href='<a href="http://osm.org/copyright" target="_blank">http://osm.org/copyright</a>'>OpenStreetMap</a> contributors",<br>    "visibility": True,<br>    "wrapDateLine": True,<br>    "fixed": True,<br>    "group": "background"<br>}, {<br>    "source": {"ptype": "gxp_olsource"},<br>    "type": "<a href="http://OpenLayers.Layer.XYZ" target="_blank">OpenLayers.Layer.XYZ</a>",<br>    "title": "CD:NGI AERIAL",<br>    "args": ["CD:NGI AERIAL", "<a href="http://a.aerial.openstreetmap.org.za/ngi-aerial/$%7Bz%7D/$%7Bx%7D/$%7By%7D.jpg" target="_blank">http://a.aerial.openstreetmap.org.za/ngi-aerial/${z}/${x}/${y}.jpg</a>"],<br>    "wrapDateLine": True,<br>    "name": "CD:NGI AERIAL",<br>    "attribution": "&copy; CD:NGI AERIAL",<br>    "visibility": False,<br>    "fixed": True,<br>    "group":"background"<br>#}, {<br>#   "source": {<br>#             "ptype":"gxp_bingsource",<br>#             "apiKey":"xjxjjxjxjxjjxjxjxjjxjxjxjxjxjxjxjxj_"<br>#             },<br>#   "group":"background",<br>#   "name":"Aerial",<br>#   "title":"Bing Satellite Imagery",<br>#   "visibility": False,<br>#   "fixed":True<br>#}, {<br>#    "source": {"ptype":"gxp_googlesource", otherParams": "sensor=false&key={0}".format(GOOGLE_API_KEY)},<br>#    "title": "GOOGLE SATELLITE"<br>#    "name": "SATELLITE",<br>#    "visibility": False,<br>#    "fixed": True,<br>#    "group":"background"<br>}]<br><br>if 'geonode.geoserver' in INSTALLED_APPS:<br>    LOCAL_GEOSERVER = {<br>        "source": {<br>            "ptype": "gxp_wmscsource",<br>            "url": OGC_SERVER['default']['PUBLIC_LOCATION'] + "wms",<br>            "restUrl": "/gs/rest"<br>        }<br>    }<br>    baselayers = MAP_BASELAYERS<br>    MAP_BASELAYERS = [LOCAL_GEOSERVER]<br>    MAP_BASELAYERS.extend(baselayers)<br></div><div><br></div></div></div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-size:11pt;white-space:pre-wrap">==</span><br></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Via di Montramito 3/A - </span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">55054  Massarosa (LU) - </span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">phone: +39 0584 962313</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">fax:     +39 0584 1660272</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">mob:   +39 331 6233686</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div>