[GeoNode-users] GeoNode-Project Installation

Toni Schönbuchner toni.schoenbuchner at csgis.de
Thu Nov 22 10:53:58 PST 2018


Hi Julierme,

don´t forget settings.py and local_settings.py is a regular python file in
the django context. means you can do what ever your needs like import from libs,
define or concat variables etc. for example have a look at spc geonodes settings:
https://github.com/olivierdalang/SPCgeonode/blob/master/spcgeonode/settings.py <https://github.com/olivierdalang/SPCgeonode/blob/master/spcgeonode/settings.py>
if it´s smaller or bigger depends on the settings geonode needs for a specific version. 

Personally I try to keep my local_settings small having only the things which should
differ to settings.py.

Cheers,

Toni

> Am 22.11.2018 um 19:47 schrieb Julierme Pinheiro <juliermeopensourcedeveloper at gmail.com>:
> 
> Hi Toni,
> 
> Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample <https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample> that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all. 
> 
> I noticed those differences I mentioned before, mainly settings.py at 2.7 has more configuration than settings.py at 2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
> One thing to consider is: If we follow the guide <https://github.com/GeoNode/geonode-project/tree/2.8> the way it is, using local_settings in wsgi.py. The GeoNode-Project at 2.8 docker installation will fail.
> 
> I appreciated your time, Toni.
> 
> Kind regards
> 
> Julierme
> 
> 
> 
> On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <toni.schoenbuchner at csgis.de <mailto:toni.schoenbuchner at csgis.de>> wrote:
> Hi Julierme,
> 
> as a little hint. With github you can view the history of each file.
> 
> For example local_settings:
> https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample <https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample>
> 
> The commit message often explains why the file was updated.
> When you click the button on the right hand side showing a specific commit hash
> you get a nice diff view what has changed. With this it should be easy to
> see what changed form 2.7 to 2.8 etc.
> 
> 	Do you notice something?
> 	– Exactly! Most of the time it´s Allesio who changed the file.
> 	That´s why we should spend him not only one round of beer
> 	at the next summit :))
> 
> Hope this makes your work a bit easier 
> Cheers,
> 
> Toni
> 
>> Am 22.11.2018 um 18:10 schrieb geonode-users-request at lists.osgeo.org <mailto:geonode-users-request at lists.osgeo.org>:
>> 
>> Message: 2
>> Date: Thu, 22 Nov 2018 15:10:40 -0200
>> From: Julierme Pinheiro <juliermeopensourcedeveloper at gmail.com <mailto:juliermeopensourcedeveloper at gmail.com>>
>> To: handy at galerigis.com <mailto:handy at galerigis.com>
>> Cc: geonode-users <geonode-users at lists.osgeo.org <mailto:geonode-users at lists.osgeo.org>>, Paolo Corti
>> 	<pcorti at gmail.com <mailto:pcorti at gmail.com>>
>> Subject: Re: [GeoNode-users] GeoNode-Project Installation
>> Message-ID:
>> 	<CAKTKyJKinYoxwh4KV4VvqB2CaVGP407h8_y-cRDc1WLQVRm7+A at mail.gmail.com <mailto:CAKTKyJKinYoxwh4KV4VvqB2CaVGP407h8_y-cRDc1WLQVRm7+A at mail.gmail.com>>
>> Content-Type: text/plain; charset="utf-8"
>> 
>> Dear all,
>> 
>> Ok. After many tests, I finally got GeoNode-Project installed using
>> "local_settings" in my_geonode/wsgi.py -->
>> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
>> "my_geonode.local_settings").
>> 
>> I have an old instance of GeoNode-Project at 2.7 running in a VM. I compared
>> settings and local_settings files of GeoNode-Project at 2.7 and
>> GeoNode-Project at 2.8. Here are some differences found:
>> 
>> Regarding local_settings.py
>> 
>> In GeoNode-Project at 2.8 SITEURL is declared before SITE_HOST_NAME and
>> SITE_HOST_PORT. But SITEURL depends on both variables.
>> 
>> In contrast, GeoNode-Project at 2.7, its local_settings.py sets SITEURL right
>> after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.
>> 
>> Regarding settings.py
>> 
>> What I realized is that settings.py for GeoNode-Project at 2.8 is smaller than
>> GeoNode-Project at 2.7. For instance I can find configuration for # prevent
>> signing up by default # in Geonode-Project at 2.7 settings.py , but I can not
>> find the same config in GeoNode-Project at 2.8 settings.p.
>> 
>> What I did: I cloned geonode-project and my_geonode folders for
>> GeoNode-Project at 2.8 and I used settings.py at 2.7 and local_settings.py at 2.7
>> instead of
>> settings.py at 2.8 and local_settings.py at 2.8. The response is:
>> GeoNode-Project at 2.8 is up and running via Docker installation.
>> 
>> Find the files settings.py and local_settings.py for GeoNode-Project at 2.7
>> and GeoNode-Project at 2.8 in attached.
>> 
>> Kind regards
>> 
>> Julierme
> 

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


More information about the geonode-users mailing list