Modules and components

Info

For a complete list of available parameters, refer to the default values in geotrek/settings/base.py.

Enable Apps

To disable specific modules, modify the custom settings file by adding the following code:

# Disable infrastructure and maintenance modules
_INSTALLED_APPS = list(INSTALLED_APPS)
_INSTALLED_APPS.remove('geotrek.infrastructure')
_INSTALLED_APPS.remove('geotrek.maintenance')
INSTALLED_APPS = _INSTALLED_APPS
INSTALLED_APPS = (
  'geotrek.cirkwi',
  'geotrek.authent',
  'geotrek.common',
  'geotrek.altimetry',
  'geotrek.core',
  'geotrek.infrastructure',
  'geotrek.signage',
  'geotrek.maintenance',
  'geotrek.zoning',
  'geotrek.land',
  'geotrek.trekking',
  'geotrek.tourism',
  'geotrek.flatpages',
  'geotrek.feedback',
  'geotrek.api',
)

Trail model enabled

This parameter allows enabling or disabling the Trail module:

TRAIL_MODEL_ENABLED = True
TRAIL_MODEL_ENABLED = False

Landedge model enabled

This parameter allows enabling or disabling the Landedge module:

LANDEDGE_MODEL_ENABLED = True
LANDEDGE_MODEL_ENABLED = False

Tourism enabled

This setting enables or disables tourism-related menus, such as touristic content and events:

TOURISM_ENABLED = True
TOURISM_ENABLED = False

Flatpages enabled

Flatpages are used in Geotrek-rando and Geotrek-mobile. This setting allows enabling or disabling them in the Django menus:

FLATPAGES_ENABLED = True
FLATPAGES_ENABLED = False

Accessibility attachments enabled

This setting enables or disables the accessibility menu for attachments:

ACCESSIBILITY_ATTACHMENTS_ENABLED = True
ACCESSIBILITY_ATTACHMENTS_ENABLED = False

Note

  • Disabling some modules may cause compatibility issues during software upgrades.

  • If you seek community support, mention any customizations you have made.

Paths

Allow path deletion

If set to False, paths that are linked to at least one topology cannot be deleted:

ALLOW_PATH_DELETION_TOPOLOGY = False
ALLOW_PATH_DELETION_TOPOLOGY = True

Alert draft

If set to True, managers will receive an email notification whenever a path is changed to draft:

ALERT_DRAFT = False
ALERT_DRAFT = True

Alert review

If set to True, managers will receive an email notification whenever an object that can be validated is moved to review mode:

ALERT_REVIEW = False
ALERT_REVIEW = True

Signage and Blade

These parameters enable or disable submodules for signage blades and lines:

BLADE_ENABLED = True
LINE_ENABLED = True
BLADE_ENABLED = False
LINE_ENABLED = True

These parameters are used to have direction field on lines instead of blades.

DIRECTION_ON_LINES_ENABLED = False
DIRECTION_ON_LINES_ENABLED = True

Blade code type

You can change the type of the blade code field (string or integer):

BLADE_CODE_TYPE = INT
BLADE_CODE_TYPE = STR

Blade code format

You can modify the format of blade codes:

BLADE_CODE_FORMAT = "{signagecode}-{bladenumber}"

Example display: CD99.XIDNZEIU.01 (first blade of XIDNZEIU)

BLADE_CODE_FORMAT = "CD99.{signagecode}.{bladenumber}"

Line code format

You can modify the format of line codes. This setting is used in CSV exports for lines:

LINE_CODE_FORMAT = "{signagecode}-{bladenumber}-{linenumber}"

Example display: CD99.XIDNZEIU-01.02

LINE_CODE_FORMAT = "CD99.{signagecode}-{bladenumber}.{linenumber}"

POI

Trek POI intersection margin

You can define a buffer around treks to intersect POIs (works only without dynamic segmentation).

TREK_POI_INTERSECTION_MARGIN = 500  # meters
TREK_POI_INTERSECTION_MARGIN = 800  # meters

Tourism

Tourism intersection margin

Defines the distance within which tourist content, events, treks, POIs, and services are displayed.

TOURISM_INTERSECTION_MARGIN = 500  # meters
TOURISM_INTERSECTION_MARGIN = 800  # meters

Note

This distance can be customized per trek practice in the admin interface.

Land

You can insert circulation and authorization types using this command:

sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/land/fixtures/circulations.json
docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/land/fixtures/circulations.json

Outdoor

Installed app for Outdoor

To enable the Outdoor module, add the following code to the custom settings file:

INSTALLED_APPS += ('geotrek.outdoor', )

Then run:

sudo dpkg-reconfigure -pcritical geotrek-admin
docker compose run --rm web update.sh

To insert Outdoor minimal data:

sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/outdoor/fixtures/basic.json
docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/outdoor/fixtures/basic.json

After installing the Outdoor module, you need to add permissions to user groups for outdoor sites and courses.

Note

Sensitive areas

Note

  • The sensitivity module was developed as part of the Biodiv’Sports project to provide a central platform for managing sensitive areas.

  • The official address of the Geotrek instance for Biodiv’Sports is: https://biodiv-sports.fr, which serves as the base URL for API calls.

Installed app for Sensitive areas

To enable the Sensitivity module, add the following code to the custom settings file:

INSTALLED_APPS += ('geotrek.sensitivity', )

To insert sensitivity area rules:

sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/sensitivity/fixtures/rules.json
cp -r /opt/geotrek-admin/lib/python*/site-packages/geotrek/sensitivity/fixtures/upload/rules/ /opt/geotrek-admin/var/media/upload/
sudo docker compose run --rm web ./manage.py loaddata rules
docker compose run --rm web bash
cp -r /opt/geotrek-admin/geotrek/sensitivity/fixtures/upload/* /opt/geotrek-admin/var/media/upload/

Sensitivity default radius

Defines the radius of sensitivity areas when not specified for species:

SENSITIVITY_DEFAULT_RADIUS = 100  # meters
SENSITIVITY_DEFAULT_RADIUS = 200  # meters

Sensitive area intersection margin

Defines the buffer around treks to intersect sensitive areas:

SENSITIVE_AREA_INTERSECTION_MARGIN = 500  # meters
SENSITIVE_AREA_INTERSECTION_MARGIN = 800  # meters

Note

If you modify this value after adding data, you must update the buffered geometry in SQL: UPDATE sensitivity_sensitivearea SET geom_buffered = ST_BUFFER(geom, <your new value>);

See also

See Sensitive area import section for data import instructions.

Zoning

These parameters enable or disable zoning combo-boxes in the list map view:

LAND_BBOX_CITIES_ENABLED = True
LAND_BBOX_DISTRICTS_ENABLED = True
LAND_BBOX_AREAS_ENABLED = False
LAND_BBOX_CITIES_ENABLED = False
LAND_BBOX_DISTRICTS_ENABLED = False
LAND_BBOX_AREAS_ENABLED = False
Zoning combo boxes