<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Toni,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I followed your hints.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I put the domain in the ALLOWED_HOSTS and now I visualise the home page.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Just a question, I had to put the domain the settings.py file because it didn't work in local_setting.py, why? Don't local_setting override setting.py?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Then I modify local_setting.py to set credential to access geonode db.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Then I alter the table you suggested and I run python manage.py --syncdb but the number of tables didn't change, is that correct?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The geonode home page is visualised but I'm not able to enter with the old administrator credential.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I presume there is no connection with the db. Should I use again setting.py instead of local_setting.py?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks in advance,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Eugenio</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Toni Schönbuchner <toni.schoenbuchner@csgis.de><br>
<b>Inviato:</b> giovedì 19 marzo 2020 20:37<br>
<b>A:</b> Eugenio Trumpy <frippe12573@hotmail.com><br>
<b>Cc:</b> geonode-users <geonode-users@lists.osgeo.org><br>
<b>Oggetto:</b> Re: migration suggestions</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Dear Eugenio,<br>
<br>
<br>
>        • I set the wgsi module in apache2. The geonode is served now with the 'allowed_hosts' error. I think the issue could be related to the settings. In the 2.4 version I remember I set SITE_URL, should I set something similar even in this version?<br>
<br>
Allowed hosts is a security mechanism by Django  to define Domains that serve your instance.<br>
<a href="https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts">https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts</a><br>
<br>
To overcome an 504 error you can add something like<br>
<br>
ALLOWED_HOSTS = ['localhost' '127.0.0.1' 'your domain.com']<br>
<br>
to your settings.py or local_settings.p However, we all more and more avoid touching the settings file and try to configure everything<br>
with environment variables. So with a manual setup you can try to add it to your uwsgi config:<br>
<a href="https://docs.geonode.org/en/master/install/core/index.html#serving-geonode-geoserver-via-nginx">https://docs.geonode.org/en/master/install/core/index.html#serving-geonode-geoserver-via-nginx</a><br>
<br>
>        • I created a geonode postgresql empty db, while I restored the backup from that I was using in 2.4 version. How I should populate with the new data-schema the geonode metadata db? I remember there was the command python manage.py --syncdb, does still
 exist? I tried but I got error.<br>
<br>
I'm unsure If I correctly understand. But the rough flow looks like:<br>
<br>
        • Export your geonode 2.4 Database<br>
        • Import it to a fresh Database<br>
        • Be sure to correctly set permissions for your User<br>
        • Change your settings.py for using the new database and in case the correct user<br>
        • Fix some inconsistency within your new database. Run f.e. with pgadmin or by psql from console<br>
                • ALTER TABLE public.layers_layer DROP COLUMN service_id<br>
        • Run the migrations, this should update your database scheme from 2.4 to 2.10<br>
                • DJANGO_SETTINGS_MODULE=YOURGEONODE.local_settings django python manage.py migrate --fake-initial<br>
<br>
You will need to change those commands to fit your setup further run into errors here and<br>
there but hopefully this steps help you to find out of the forest.<br>
<br>
Cheers,<br>
<br>
Toni<br>
<br>
<br>
-----------------------------------------------<br>
CSGIS<br>
<br>
-----------------------------------------------<br>
Spinnereistraße 7<br>
Halle 18 04179 Leipzig<br>
-----------------------------------------------<br>
Web             <a href="https://csgis.de">https://csgis.de</a><br>
-----------------------------------------------<br>
<br>
Hinweis gemäß § 33 BDSG<br>
Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
<br>
Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
<br>
erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
<br>
von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
<br>
Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.<br>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>