Friday 18 December 2015

Overriding GeoNode template?


I´m making a GIS-Portal with GeoNode 2.6 (running in ubuntu 16.04 server) and I want to change the look of the home page following this instructions: http://docs.geonode.org/en/master/tutorials/admin/customize_lookfeel/customize/theme_admin.html (I´m a beginner at this). I have copied the "site_index.html" and "site_base.html" from /usr/local/lib/python2.7/dist-packages/geonode/contrib/geosites/site_template/templates/ to /etc/geonode/templates/ I edited both html files. Then I run the collectstatic command and restart apache2, but i see no changes in the homepage.


in local_settings.py is set:


TEMPLATE_DIRS = ( '/etc/geonode/templates', os.path.join(GEONODE_ROOT, 'templates')


Any ideas of what i´m missing to make it work?


I also tried editing the index.html file without any luck. It only changes when editing /usr/local/lib/python2.7/dist-packages/geonode/templates/index.html



Answer



Finally i did it following this setup steps



Following the previus link you will create a project folder in home/geonode/my_geonode. Editions made here will be displayed in the web page.


In order to override the html files, complete blocks must be copied to site_base and site_index, and then edited.


Also check the tips in this link ´s answer to make sure your overriding files are located in the right place


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...