[GeoNode-users] Theming Geonode

Rizky Maulana Nugraha rizky at kartoza.com
Wed Nov 28 04:23:29 PST 2018


Hi Paulo,

Once you follow these steps:
> (I've followed this installation steps https://github.com/GeoNode/geonode-project <https://github.com/GeoNode/geonode-project>)
Then basically you have created a new Django app with GeoNode as it base.
In this sense, you could put your own staticfiles or templates etc in your new Django app.
Let’s say your `project_name` is `my_geonode`, then you can put staticfiles in `my_geonode\static` and put templates in `my_geonode\templates`.
If you want to replace a file, just put it in the exact same directory structure with the corresponding file in GeoNode that you want to override.

I would say, to find the Geonode files itself, you don’t have to find it inside the docker image. Just copy from GeoNode repo. GeoNode version that you need to look up is in the `requirements.txt` file in `my_geonode` root dir.
For example, by default it will show up as this:


# GeoNode
-e git+https://github.com/GeoNode/geonode.git@master#egg=geonode <git+https://github.com/GeoNode/geonode.git@master#egg=geonode>

Which means it fetches directly from master branch. I imagine, you can change this to your corresponding GeoNode version you want to use.
If for some reasons you want to look at this files directly inside the container, you can find it in python’s site-packages directory (Because in this case GeoNode were installed as python package).

If you are interested to see the folder structure inside the docker image, then your Django app will be `copied` into directory `/usr/src/my_geonode`.
Since your Django app were copied at Docker build stage, then if you change your files in your host, you had to rebuild your image to apply the changes.
Alternatively, what I do is to bind mount `my_geonode` for development phase. So I change corresponding entry in `docker-compose.override.yml` to bind mount `my_geonode`.
These are an excerpt of the example:

services:
  django:
    volumes:
      - ./:/usr/src/my_geonode

These steps are probably not so obvious because it assumes that you know how Docker and Django works in general.

Regards,
-- 
Rizky Maulana Nugraha
Software Developer
rizky at kartoza.com




> On 28 Nov 2018, at 18.06, Paulo Frias <pfrias82 at gmail.com> wrote:
> 
> Hi all,
> 
> I have Geonode up and running on docker (I've followed this installation steps https://github.com/GeoNode/geonode-project <https://github.com/GeoNode/geonode-project>). Now I want to do some changes to the geonode template, i.e. change the logo, colours, etc. 
> 
> I should be able to find the geonode files like base.css, folder "img" with the geonode logo, etc. but I don't know where they are located. Probably somewhere inside docker?! Sorry for this newbie question but I didn't find a solution searching on the web. 
> 
> Thanks in advance. 
> Paulo Frias
> 
> P.S. - I'm running docker on a Mac Os X. 
> 
> 
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20181128/247cb073/attachment.html>


More information about the geonode-users mailing list