<div dir="ltr">Hmmm, I'm not sure. Your conclusions from the tests seem correct. <div><br></div><div>As Toni mentions, make sure you haven't accidently disabled the datastore ENGINE with this line: </div><div>

<span style="color:rgb(32,18,77);font-family:arial,sans-serif;font-size:large;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">        'ENGINE': 'django.contrib.gis.db.</span><wbr style="color:rgb(32,18,77);font-family:arial,sans-serif;font-size:large;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(32,18,77);font-family:arial,sans-serif;font-size:large;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">backends.postgis',</span><br style="color:rgb(32,18,77);font-family:arial,sans-serif;font-size:large;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(32,18,77);font-family:arial,sans-serif;font-size:large;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">        'ENGINE': '', # Empty ENGINE name disables</span>

<br></div><div><br></div><div>it should be the postgis option.</div><div><br></div><div>Apart from that, it's difficult to diagnose via email. If your code is in a public repo I can take a look, or share details to david dot kennewell at hydrata dot com and I can take a look. We'll report back to the list so others can learn what we find. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 April 2018 at 23:13, Julierme Pinheiro <span dir="ltr"><<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><span style="color:rgb(32,18,77)"><font size="4">Hi Dave Kennewell,<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">First, let me introduce you the DATABASES configuration to:<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4"><b>1 - Geonode (apt-get)</b><br><br>  DATABASE_ENGINE = 'postgresql_psycopg2'<br>DATABASE_NAME = 'geonode'<br>DATABASE_USER = 'geonode'<br>DATABASE_PASSWORD = 'DBImAITC'<br>DATABASE_HOST = 'localhost'<br>DATABASE_PORT = '5432'<br><br><br>DATABASES = {<br>    'default': {<br>        'ENGINE': 'django.db.backends.<wbr>postgresql_psycopg2',<br>        'NAME': DATABASE_NAME,<br>        'USER': DATABASE_USER,<br>        'PASSWORD': DATABASE_PASSWORD,<br>        'HOST': DATABASE_HOST,<br>        'PORT': DATABASE_PORT,<br>        'CONN_TOUT': 900,<br>    },<br>    # vector datastore for uploads<br>    'datastore': {<br>        'ENGINE': 'django.contrib.gis.db.<wbr>backends.postgis',<br>        'NAME': 'geonode_data',<br>        'USER': DATABASE_USER,<br>        'PASSWORD': DATABASE_PASSWORD,<br>        'HOST': DATABASE_HOST,<br>        'PORT': DATABASE_PORT,<br>        'CONN_TOUT': 900,<br>    }<br>}<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4"><b>2 - Geonode-Project (Virtualenv)</b><br><br>DATABASES = {<br>    'default': {<br>         'ENGINE': 'django.db.backends.<wbr>postgresql_psycopg2',<br>         'NAME': 'geonode',<br>         'USER': 'geonode',<br>         'PASSWORD': 'geonode',<br>         'HOST' : 'localhost',<br>         'PORT' : '5432',<br>         'CONN_TOUT': 900,<br>     },<br>    # vector datastore for uploads<br>    'datastore' : {<br>        'ENGINE': 'django.contrib.gis.db.<wbr>backends.postgis',<br>        'ENGINE': '', # Empty ENGINE name disables<br>        'NAME': 'geonode_data',<br>        'USER' : 'geonode',<br>        'PASSWORD' : 'geonode',<br>        'HOST' : 'localhost',<br>        'PORT' : '5432',<br>        'CONN_TOUT': 900,<br>    }<br>}<br><br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">From both DB configuration, I realized one difference: "the database password"<br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4"><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">I made some tests which are found bellow with their results:<br></font></span></div><span style="color:rgb(32,18,77)"><font size="4"><br><br><b>Test 1: geonode.conf (default created by apt-get installation)</b><br><br><br>:~$ cd  /etc/julierme_virtualenv/my_</font></span><span style="color:rgb(32,18,77)"><font size="4">g<wbr>eonode/my_geonode/</font></span><span class=""><div>

<span style="color:rgb(32,18,77)"><font size="4"><span style="font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">:~$</span>
python manage.py shell</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>from django.conf import settings</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>settings.DATABASES</font></span></div></span><span style="color:rgb(32,18,77)"><font size="4">{'default': {'ENGINE': 'django.db.backends.<wbr>postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': False, 'NAME': 'geonode', 'CONN_MAX_AGE': 0, 'CONN_TOUT': 900, 'TIME_ZONE': 'UTC', 'OPTIONS': {}, 'HOST': 'localhost', 'USER': 'geonode', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': 'DBImAITC', 'PORT': '5432'}, 'datastore': {'ENGINE': 'django.contrib.gis.db.<wbr>backends.postgis', 'NAME': 'geonode_data', 'CONN_TOUT': 900, 'HOST': 'localhost', 'USER': 'geonode', 'PASSWORD': 'DBImAITC', 'PORT': '5432'}}<br><br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4"><b>Test 2: geonode.conf (changed according to Geonode-Project WITHOUT commenting DATABASES = {...} )</b><br><br>:~$ cd  /etc/julierme_virtualenv/my_</font></span><span style="color:rgb(32,18,77)"><font size="4">g<wbr>eonode/my_geonode/</font></span><span class=""><div>

<span style="color:rgb(32,18,77)"><font size="4"><span style="font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">:~$</span>
python manage.py shell</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>from django.conf import settings</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>settings.DATABASES</font></span></div></span><span style="color:rgb(32,18,77)"><font size="4">{'default':
 {'ENGINE': 'django.db.backends.<wbr>postgresql_psycopg2', 'AUTOCOMMIT': 
True, 'ATOMIC_REQUESTS': False, 'NAME': 'geonode', 'CONN_MAX_AGE': 0, 
'CONN_TOUT': 900, 'TIME_ZONE': 'UTC', 'OPTIONS': {}, 'HOST': 
'localhost', 'USER': 'geonode', 'TEST': {'COLLATION': None, 'CHARSET': 
None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': 'DBImAITC', 'PORT': 
'5432'}, 'datastore': {'ENGINE': 
'django.contrib.gis.db.<wbr>backends.postgis', 'NAME': 'geonode_data', 
'CONN_TOUT': 900, 'HOST': 'localhost', 'USER': 'geonode', 'PASSWORD': 
'DBImAITC', 'PORT': '5432'}}<br><br><br></font></span></div><div><span style="color:rgb(32,18,77)"><b><font size="4">Test 3: geonode.conf (changed according to Geonode-Project commenting DATABASES = {...} )</font></b><font size="4"><br></font></span></div><div><span class=""><span style="color:rgb(32,18,77)"><font size="4"><br>:~$ cd  /etc/julierme_virtualenv/my_</font></span><span style="color:rgb(32,18,77)"><font size="4">g<wbr>eonode/my_geonode/</font></span><div>

<span style="color:rgb(32,18,77)"><font size="4"><span style="font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">:~$</span>
python manage.py shell</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>from django.conf import settings</font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">>>>settings.DATABASES</font></span></div></span><span style="color:rgb(32,18,77)"><font size="4">{'default':
 {'ENGINE': 'django.db.backends.<wbr>postgresql_psycopg2', 'AUTOCOMMIT': 
True, 'ATOMIC_REQUESTS': False, 'NAME': 'geonode', 'CONN_MAX_AGE': 0, 
'CONN_TOUT': 900, 'TIME_ZONE': 'UTC', 'OPTIONS': {}, 'HOST': 
'localhost', 'USER': 'geonode', 'TEST': {'COLLATION': None, 'CHARSET': 
None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': 'DBImAITC', 'PORT': 
'5432'}, 'datastore': {'ENGINE': 
'django.contrib.gis.db.<wbr>backends.postgis', 'NAME': 'geonode_data', 
'CONN_TOUT': 900, 'HOST': 'localhost', 'USER': 'geonode', 'PASSWORD': 
'DBImAITC', 'PORT': '5432'}}<br><br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">I may be wrong, but from these tests I have concluded that the database being used is always the Geonode (apt-get), because of the password showed in settings.DATABASES ('PASSWORD': 'DBImAITC').<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">What else could be? I am still thinking about.<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">I appreciated your time.<br><br></font></span></div><div><span style="color:rgb(32,18,77)"><font size="4">Kind Regards<span class="HOEnZb"><font color="#888888"><br><br></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><div><span style="color:rgb(32,18,77)"><font size="4">Julierme</font></span><br></div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2018-04-18 14:16 GMT-03:00 Dave Kennewell <span dir="ltr"><<a href="mailto:davekennewell@gmail.com" target="_blank">davekennewell@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK, I think you can simply delete the "<span style="color:rgb(0,0,0);font-family:"Courier New";font-size:9pt">DATABASES = {...}" </span>lines from my_geonode/settings.py which I suspect is overriding the default postgres database with something else.<div><br></div><div>Don't forget to restart apache2 after changing the settings - this will reload them through wsgi - "sudo service apache2 restart"<br> </div><div>If you want to check exactly which settings are being used by your geonode-project:</div><br>:~$ cd  /etc/julierme_virtualenv/my_g<wbr>eonode/my_geonode/<div>

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">:~$</span>
python manage.py shell</div><div>>>>from django.conf import settings</div><div>>>>settings.DATABASES</div><div><br></div><div><div> should give you all the relevant database configuration that your project is actually using.</div><div><div class="m_-7407014905437542157h5"><div><br></div><div><br></div><div><br><div><font color="#000000" face="Courier New"><span style="font-size:12px"><br></span></font><div class="gmail_extra"><br><div class="gmail_quote">On 18 April 2018 at 21:04, Julierme Pinheiro <span dir="ltr"><<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@g<wbr>mail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><span style="color:rgb(32,18,77)"><font size="4">Hi Dave Kennewell,<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">First of all, thank you very much for your prompt reply.<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">I understood your highlights. And going back to your questions:<span><br><br><b>The next steps to "fix" this depends on which database you want to use long-term?</b><br><br></span></font></span></div><span style="color:rgb(32,18,77)"><font size="4">The postgresql database used by my Geonode (installed via apt-get) is my production database and I want to keep it.<span><br><br><b>Does this sound right or do you think it is something else? </b><br><br></span></font></span></div><span style="color:rgb(32,18,77)"><font size="4">I think you are right and how I could set my database to be Geonode (apt-get) the long-term? Should this change be done through the wsgi.py?<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">My long-term database configuration installed via apt-get is set in the /etc/geonode/local_settings.py<wbr>. <br><br>My wsgi.py and local_settings.py in Geonode-Project (installed via Python virtualenv), in the other hand, are available in /etc/julierme_virtualenv/my_ge<wbr>onode/my_geonode/my_geonode/<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">So, how can I keep postgresql (long-term) installed via apt-get while I change geonode.conf in order to use the layout of Geonode-Project?<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Thank you very much for your time.<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">I appreciated it.<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Julierme </font></span><br><div><div><div><div><div><br><br><div><div><br><div><br><br><div><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7407014905437542157m_4498669582210794376h5">2018-04-18 12:24 GMT-03:00 Dave Kennewell <span dir="ltr"><<a href="mailto:davekennewell@gmail.com" target="_blank">davekennewell@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7407014905437542157m_4498669582210794376h5"><div dir="ltr">Hi Julierme, <div><br></div><div>The missing maps and users suggests to me that geonode is now using a different database. If it is still working, but just with no maps or users, my guess is:</div><div><br></div><div>Prior to configuring geonode.conf, you would have been using the default postgresql database that is installed with geonode via apt-get. This is likely where your 6 maps & 2 users currently reside.</div><div><br></div><div>After configuring geonode.conf, you will likely be using <a href="http://your_geonode_project.wsgi.py" target="_blank">your_geonode_project.wsgi.py</a>, which will point to your_geonode_project.settings. This settings file will override the default postgresql database with whatever you have in there (either in your_geonode_project.settings or local_settings.py)</div><div><br></div><div>The next steps to "fix" this depends on which database you want to use long-term?</div><div><br></div><div>Does this sound right or do you think it is something else? </div><div><br></div><div>regards</div><div>Dave</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7407014905437542157m_4498669582210794376m_-2584383400945375907h5">On 18 April 2018 at 19:13, juliermeopensourcedeveloper [via OSGeo.org] <span dir="ltr"><<a href="mailto:ml+s1560n5361932h7@n6.nabble.com" target="_blank">ml+s1560n5361932h7@n6.nabble.<wbr>com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7407014905437542157m_4498669582210794376m_-2584383400945375907h5">

        <div dir="ltr"><div><div><div><div><div><div><div><span style="color:rgb(32,18,77)"><font size="4">Dear all,<br> <br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">I just finished configuring <b>geonode.conf</b> in order to customize Geonode main layout (installed via apt-get) based on changes made through Geonode-Project Dev layout (installed via Python Virtualenv). Before configuring <b>geonode.conf</b>, I had 6 Maps and 2 users in my Geonode and after applying Geonode-Project Dev layout by changing <b>geonode.conf</b>, I faced the following problems:<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">1 - The 6 Maps and 2 Users I had in Geonode are gone;<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">2 - I am unable to log in even with Geonode default credentials;<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Could someone tell me why I am facing these problems and figure out one way to fix them?<br><br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Thank you very much for your time and patience in advance.<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Best Regards<br><br></font></span></div><span style="color:rgb(32,18,77)"><font size="4">Julierme    </font></span><br></div>
<br></div></div>______________________________<wbr>_________________
<br>geonode-users mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=5361932&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="nofollow" link="external" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/geonode-users</a><br>

        
        
        
        <br>
        <br>
        <hr size="1" noshade color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1560.x6.nabble.com/Customizing-Geonode-Installed-via-apt-get-from-Geonode-project-Dev-Installed-via-Python-Virtualenv-tp5361932.html" target="_blank">http://osgeo-org.1560.x6.nabbl<wbr>e.com/Customizing-Geonode-Inst<wbr>alled-via-apt-get-from-Geonode<wbr>-project-Dev-Installed-via-Pyt<wbr>hon-Virtualenv-tp5361932.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from GeoNode users, <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5185389&code=ZGF2ZWtlbm5ld2VsbEBnbWFpbC5jb218NTE4NTM4OXwtOTI1NjEyMTk0" target="_blank">click here</a>.<br>
                <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank">NAML</a>
        </div></blockquote></div><br></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></div></div></div>
<br>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>