[GeoNode-users] R: migration suggestions

Eugenio Trumpy frippe12573 at hotmail.com
Fri Mar 20 11:58:58 PDT 2020

Dear Toni,

I followed your hints.
I put the domain in the ALLOWED_HOSTS and now I visualise the home page.
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?
Then I modify local_setting.py to set credential to access geonode db.
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?
The geonode home page is visualised but I'm not able to enter with the old administrator credential.
I presume there is no connection with the db. Should I use again setting.py instead of local_setting.py?

Thanks in advance,


Da: Toni Schönbuchner <toni.schoenbuchner at csgis.de>
Inviato: giovedì 19 marzo 2020 20:37
A: Eugenio Trumpy <frippe12573 at hotmail.com>
Cc: geonode-users <geonode-users at lists.osgeo.org>
Oggetto: Re: migration suggestions

Dear Eugenio,

>        • 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?

Allowed hosts is a security mechanism by Django  to define Domains that serve your instance.

To overcome an 504 error you can add something like

ALLOWED_HOSTS = ['localhost' '' 'your domain.com']

to your settings.py or local_settings.p However, we all more and more avoid touching the settings file and try to configure everything
with environment variables. So with a manual setup you can try to add it to your uwsgi config:

>        • 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.

I'm unsure If I correctly understand. But the rough flow looks like:

        • Export your geonode 2.4 Database
        • Import it to a fresh Database
        • Be sure to correctly set permissions for your User
        • Change your settings.py for using the new database and in case the correct user
        • Fix some inconsistency within your new database. Run f.e. with pgadmin or by psql from console
                • ALTER TABLE public.layers_layer DROP COLUMN service_id
        • Run the migrations, this should update your database scheme from 2.4 to 2.10
                • DJANGO_SETTINGS_MODULE=YOURGEONODE.local_settings django python manage.py migrate --fake-initial

You will need to change those commands to fit your setup further run into errors here and
there but hopefully this steps help you to find out of the forest.




Spinnereistraße 7
Halle 18 04179 Leipzig
Web             https://csgis.de

Hinweis gemäß § 33 BDSG
Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200320/3c52b300/attachment-0001.html>

More information about the geonode-users mailing list