View on GitHub

geonode-training

Introduction to Configuring GeoNode (Basics)

GeoNode is built on top of Django. As a Django application GeoNode follows the common rules of a Django project.

In particular every Django project must have a special python file called settings.py which will be used to set the global variables and behavior of the whole framework.

Some settings variables are mandatory for a Django project, as an instance the version, the site url, the allowed hosts, the database configuration, the debug mode, etc… For more information about the common Django settings you can check the official Django documentation.

GeoNode Settings

GeoNode, of course, has this file too which is located into the /opt/geonode/geonode/settings.py location.

There are plenty of variables listed on the settings file, most of them have a notation similar to the following one:

   SITEURL = os.getenv('SITEURL', _default_siteurl)

That means that GeoNode looks first for the variable value into the System Environment and, if no value or variable has been found, it falls back to a default one.

You can find a full list of available settings from the GeoNode official documentation here.

Exercise: Settings Update to Toggle User Registration

Changing some GeoNode settings can be done by:

  1. Udate or add the corresponding ENV variable value (or add it if missing)
  2. Restart the Django service

Next Section: Introduction to Administering GeoNode (Basics)