[GeoNode-devel] getting started

Simone Dalmasso simone.dalmasso at gmail.com
Fri May 27 05:58:20 PDT 2016


Hi Jonas,

the way the geonode customisation in production works is the following:

- geonode is installed using the normal ubuntu apt-get install command,
this will provide a standard working geonode

- you create the template my_geonode from the geonode-project, this
template has some default settings but it's also importing the geonode
settings of the previously installed with apt. We have to remember that
with apt-get install, geonode is installed systemwide on ubuntu so, no
matter where, python will always be able do do "import geonode" and "from
geonode import settings". The latter is exactly what you will find in the
my_geonode folder. So the my_geonode inherits all settings from geonode,
databse included.

- the my_geonode folder is built to facilitate customisation because
provides some configuration to override the standard geonode templates, so
if you modify the site_index template in my_geonode, then you will override
the systemwide look and feel.

- how do you run this my_geonode template? By changing the apache
configuration that by default points to the default geonode, you can
redirect it to the my_geonode wsgi file, this way the my_geonode will use
the systemwide geonode as a library adding your customisation.

So to sum up:
- there is no need to copy any file, my_geonode is configured to use geonode
- the syncdb is necessary only if you add additional models otherwise it
will use the geonode database
- if you change the css files you have to make them available by issuing
"python manage.py collectstatic" inside the my_geonode folder
- at the end you only care about the code you write in my_geonode as the
geonode "engine" is the standard 2.4.

Hope this helps


2016-05-27 14:14 GMT+02:00 jonas ellehauge <jonas at ellevator.net>:

> Hi all,
>
> I am just getting started with geonode and spent a few days wrapping my
> head around it. After some initial trouble, I got the production version up
> and running on a VirtualBox Ubuntu 14.04 server 64 bit. It appears that the
> production version is not suitable for customization, so I need a work-flow
> on how to customize the site before pushing it to production server.
>
> @GeoNode on twitter confirmed that there is a suitable work-flow for that
> and directed my to geonode-project
> <https://github.com/geonode/geonode-project> and ansible-geonode
> <https://github.com/GeoNode/ansible-geonode> and github which I have now
> spent another few days implementing - now finally admitting that I am
> stuck. @GeoNode also directed my to this email-list for further questions.
>
> I ran "python manage.py syncdb" (why does it use sqllite by default with
> no postgis settings in my_geonode.settings?) and I ran "python manage.py
> runserver" only to see errors revealing that practically all html templates
> are missing from the my_geonode/temlates/. So, I copied all the templates
> from the production vm (at
> /usr/local/lib/python2.7/dist-packages/geonode/templates/*) to my host
> machine and put them in my_geonode/templates/ - only to see that all static
> css files etc are also missing.
>
> Before I go ahead and copy those from the production vm, I need to know
> what I am doing wrong?
>
> Why am I missing all these essential files when I follow the instructions
> on geonode-project <https://github.com/geonode/geonode-project> and based
> my project on the appropriate template?
>
> The local geonode package is located at
> "my_geonode/venv/local/lib/python2.7/site-packages/geonode/" and doesn't
> contain any templates while the one on the procution vm does - why are
> those packages not identical - I assume they are both installed using pip?
> (I know the local one is while the vm one was installed indirectly with
> "apt-get install geonode").
>
> Cheers,
> Jonas
>
>
>
>
>
>
>
>
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160527/0228298b/attachment-0001.html>


More information about the geonode-devel mailing list