From ac2e90fcadfcbb529cb1e7399b61c4d4f8fc71ea Mon Sep 17 00:00:00 2001 From: bruhnild Date: Mon, 13 Jan 2025 18:21:18 +0100 Subject: [PATCH] Add keywords --- docs/advanced-configuration/attachments.rst | 2 + docs/advanced-configuration/edition.rst | 19 +- .../feedback-report-settings.rst | 158 ++++++++++++++--- docs/advanced-configuration/interface.rst | 43 +++-- .../modules-and-components.rst | 130 ++++++++++---- .../settings-for-geotrek-mobile.rst | 165 +++++++++++++----- .../settings-for-geotrek-rando.rst | 60 +++++-- docs/import-data/import-aggregator.rst | 4 +- docs/import-data/import-areas.rst | 7 +- docs/import-data/import-dem-raster.rst | 5 + docs/import-data/import-other-data.rst | 4 + docs/import-data/import-paths.rst | 5 + .../import-touristic-data-systems.rst | 5 + docs/import-data/minimal-initial-data.rst | 5 + 14 files changed, 470 insertions(+), 142 deletions(-) diff --git a/docs/advanced-configuration/attachments.rst b/docs/advanced-configuration/attachments.rst index 4839307246..b906cad6d4 100644 --- a/docs/advanced-configuration/attachments.rst +++ b/docs/advanced-configuration/attachments.rst @@ -30,6 +30,8 @@ Attached files are downloaded by default by browser, with the following line, fi Resizing uploaded pictures ---------------------------- +See the default values in `geotrek/settings/base.py `_ for the complete list of available parameters. + Paperclip resize attachments on upload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/advanced-configuration/edition.rst b/docs/advanced-configuration/edition.rst index c38c9b5dc4..bdee700798 100644 --- a/docs/advanced-configuration/edition.rst +++ b/docs/advanced-configuration/edition.rst @@ -67,11 +67,22 @@ You can also add ``{legend}``: ``"{title}-:-{author}-:-{legend}"`` Thumbnail copyright size ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Change the size of thumbnail +Change the size of thumbnail: -Example:: +.. md-tab-set:: + :name: thumbnail-copyright-tabs + + .. md-tab-item:: Default configuration - THUMBNAIL_COPYRIGHT_SIZE = 15 + .. code-block:: python + + THUMBNAIL_COPYRIGHT_SIZE = 15 + + .. md-tab-item:: Example + + .. code-block:: python + + THUMBNAIL_COPYRIGHT_SIZE = 20 Facebook configuration ----------------------- @@ -103,7 +114,7 @@ Example:: Override translations ---------------------- -Translations are managed by https://weblate.makina-corpus.net/ where you can contribute. +Translations are managed by `Weblate `_ where you can contribute. But you can also override default translation files available in each module (for example those from trekking module available in ``/opt/geotrek-admin/lib/python3.6/site-packages/geotrek/trekking/locale/fr/LC_MESSAGES/django.po``). diff --git a/docs/advanced-configuration/feedback-report-settings.rst b/docs/advanced-configuration/feedback-report-settings.rst index 70e474974e..1f29577ba2 100644 --- a/docs/advanced-configuration/feedback-report-settings.rst +++ b/docs/advanced-configuration/feedback-report-settings.rst @@ -4,6 +4,8 @@ Feedback reports settings ========================== +See the default values in `geotrek/settings/base.py `_ for the complete list of available parameters. + Send acknowledge email ------------------------ @@ -19,12 +21,12 @@ If ``False``, no email will be sent to the sender of any feedback on Geotrek-ran .. code-block:: python - SEND_REPORT_ACK = False + SEND_REPORT_ACK = True .. md-tab-item:: Example .. code-block:: python - SEND_REPORT_ACK = True + SEND_REPORT_ACK = False .. _suricate-support: @@ -42,9 +44,20 @@ This mode sends no report data to Suricate. To initialize Report forms (Geotrek-admin, Geotrek-rando-V2, Geotrek-rando-V3) load lists for categories, activities, statuses and problem magnitude: -.. code-block:: python +.. md-tab-set:: + :name: loaddata-no-suricate-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/basic.json - geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/basic.json + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/basic.json 2 - Suricate Standard ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -187,28 +200,73 @@ You can find the same detailled explanation on the workflow in `this article in You can use the following command to test your connection settings: -.. code-block:: python +.. md-tab-set:: + :name: sync-suricate-connectiontest-tabs - geotrek sync_suricate -v 2 --connection-test + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek sync_suricate -v 2 --connection-test + + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py sync_suricate -v 2 --connection-test Load lists for activities and/or report statuses from Suricate: -.. code-block:: python +.. md-tab-set:: + :name: sync-suricate-status-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek sync_suricate --activities --statuses -v 2 - geotrek sync_suricate --activities --statuses -v 2 + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py sync_suricate --activities --statuses -v 2 Load alerts from Suricate (located in your bounding box) : -.. code-block:: python +.. md-tab-set:: + :name: sync-suricate-alerts-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek sync_suricate -v 2 --no-notification + + .. md-tab-item:: With Docker - geotrek sync_suricate -v 2 --no-notification + .. code-block:: python + + docker compose run --rm web ./manage.py sync_suricate -v 2 --no-notification - Then load extra required statuses for Reports and Interventions: -.. code-block:: python +.. md-tab-set:: + :name: sync-suricate-reports-tabs - geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/management_workflow.json - geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/maintenance/fixtures/basic.json + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/management_workflow.json + geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/maintenance/fixtures/basic.json + + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/management_workflow.json + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/maintenance/fixtures/basic.json - Go to the configuration site and : @@ -223,11 +281,24 @@ Load alerts from Suricate (located in your bounding box) : Make sure to run these three commands daily to maintain synchronization and update reports (thanks to `cron` for instance) : -.. code-block:: python +.. md-tab-set:: + :name: sync-suricate-sync-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek retry_failed_requests_and_mails + geotrek check_timers + geotrek sync_suricate - geotrek retry_failed_requests_and_mails - geotrek check_timers - geotrek sync_suricate + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py retry_failed_requests_and_mails + docker compose run --rm web ./manage.py check_timers + docker compose run --rm web ./manage.py sync_suricate Display reports with status defined colors -------------------------------------------- @@ -244,12 +315,12 @@ Go to the Configuration site and select colors to display for each status (`/adm .. code-block:: python - ENABLE_REPORT_COLORS_PER_STATUS = False + ENABLE_REPORT_COLORS_PER_STATUS = True .. md-tab-item:: Example .. code-block:: python - ENABLE_REPORT_COLORS_PER_STATUS = True + ENABLE_REPORT_COLORS_PER_STATUS = False Use timers to receive alerts for your reports ------------------------------------------------- @@ -268,9 +339,21 @@ Use timers to receive alerts for your reports - Make sure to run this commands daily to send email alerts and clear obsolete timers (thanks to `cron` for instance) : -.. code-block:: python - geotrek check_timers +.. md-tab-set:: + :name: sync-checktimers-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek check_timers + + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py check_timers Anonymize feedback reports --------------------------- @@ -279,16 +362,37 @@ To be compliant to GDPR, you cannot keep personnal data infinitely, and should notice your users on how many time you keep their email. A Django command is available to anonymize reports, by default older -than 365 days. +than 365 days: -.. code-block:: bash +.. md-tab-set:: + :name: erase-emails-tabs - geotrek erase_emails + .. md-tab-item:: With Debian -Or if you want to erase emails for reports older than 90 days + .. code-block:: bash + + geotrek erase_emails -.. code-block:: bash + .. md-tab-item:: With Docker - geotrek erase_emails --days 90 + .. code-block:: python + + docker compose run --rm web ./manage.py erase_emails +Or if you want to erase emails for reports older than 90 days: + +.. md-tab-set:: + :name: erase-emails-older-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + geotrek erase_emails --days 90 + + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py erase_emails --days 90 diff --git a/docs/advanced-configuration/interface.rst b/docs/advanced-configuration/interface.rst index aaeb5e2757..1741887fcb 100644 --- a/docs/advanced-configuration/interface.rst +++ b/docs/advanced-configuration/interface.rst @@ -20,12 +20,25 @@ For each module, use the following syntax to configure columns to export as CSV COLUMNS_LISTS['_export'] = ['list', 'of', 'columns'] -Another setting exists to enable a more detailed export of jobs costs in the interventions module. When enabling this settings, interventions list exports will contain a new column for each job's total cost. + +.. md-tab-set:: + :name: enable-job-costs-detailed-export-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + ENABLE_JOBS_COSTS_DETAILED_EXPORT = False + .. md-tab-item:: Example + + .. code-block:: python + + ENABLE_JOBS_COSTS_DETAILED_EXPORT = True Enable jobs cost detailed export ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Enable a more detailed export +Enable a more detailed export : .. md-tab-set:: :name: enable-job-costs-detailed-export-tabs @@ -41,6 +54,8 @@ Enable jobs cost detailed export ENABLE_JOBS_COSTS_DETAILED_EXPORT = True +When enabling this setting, interventions list exports will contain a new column for each job's total cost. + Custom columns available ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1128,11 +1143,11 @@ Configure form fields in creation views Hidden form fields ~~~~~~~~~~~~~~~~~~~~ - For each module, use the following syntax to configure fields to hide in the creation form. +For each module, use the following syntax to configure fields to hide in the creation form. - Example:: +Example:: - HIDDEN_FORM_FIELDS[''] = ['list', 'of', 'fields'] + HIDDEN_FORM_FIELDS[''] = ['list', 'of', 'fields'] Hideable form fields @@ -1449,20 +1464,18 @@ and ``error_on_review`` if you want this fields to be required before sending to Completeness level ~~~~~~~~~~~~~~~~~~~ - Configure completeness level - - Example:: +Example of completeness level configuration:: - COMPLETENESS_LEVEL = 'warning' + COMPLETENESS_LEVEL = 'warning' Completeness fields ~~~~~~~~~~~~~~~~~~~~~ - For each module, configure fields to be needed or required on review or publication +For each module, you can configure fields to be needed or required on review or publication. - Example:: +Example:: - COMPLETENESS_FIELDS = { - 'trek': ['practice', 'departure', 'duration', 'difficulty', 'description_teaser'], - 'dive': ['practice', 'difficulty', 'description_teaser'], - } + COMPLETENESS_FIELDS = { + 'trek': ['practice', 'departure', 'duration', 'difficulty', 'description_teaser'], + 'dive': ['practice', 'difficulty', 'description_teaser'], + } diff --git a/docs/advanced-configuration/modules-and-components.rst b/docs/advanced-configuration/modules-and-components.rst index e47287aaee..2fa31c6bdd 100644 --- a/docs/advanced-configuration/modules-and-components.rst +++ b/docs/advanced-configuration/modules-and-components.rst @@ -4,6 +4,8 @@ Modules and components ======================= +See the default values in `geotrek/settings/base.py `_ for the complete list of available parameters. + Enable Apps ------------ @@ -30,9 +32,10 @@ In order to remove notion of trails: .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python TRAIL_MODEL_ENABLED = True + .. md-tab-item:: Example .. code-block:: python @@ -53,9 +56,10 @@ In order to remove landedge model: .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python LANDEDGE_MODEL_ENABLED = True + .. md-tab-item:: Example .. code-block:: python @@ -81,9 +85,10 @@ In order to hide TouristicContents and TouristicEvents on menu. .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python TOURISM_ENABLED = True + .. md-tab-item:: Example .. code-block:: python @@ -100,9 +105,10 @@ In order to hide Flatpages on menu. Flatpages are used in Geotrek-rando: .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python FLATPAGES_ENABLED = True + .. md-tab-item:: Example .. code-block:: python @@ -119,9 +125,10 @@ In order to hide the accessibility menu for attachments: .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python ACCESSIBILITY_ATTACHMENTS_ENABLED = True + .. md-tab-item:: Example .. code-block:: python @@ -145,9 +152,10 @@ If ``False``, it forbids to delete a path when at least one topology is linked t .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python ALLOW_PATH_DELETION_TOPOLOGY = False + .. md-tab-item:: Example .. code-block:: python @@ -164,14 +172,15 @@ If ``True``, it sends a message to managers (MANAGERS) whenever a path has been .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python - ALERT_DRAFT = True + ALERT_DRAFT = False + .. md-tab-item:: Example .. code-block:: python - ALERT_DRAFT = False + ALERT_DRAFT = True Alert review ~~~~~~~~~~~~~ @@ -183,14 +192,15 @@ If ``True``, it sends a message to managers (MANAGERS) whenever an object which .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python - ALERT_REVIEW = True + ALERT_REVIEW = False + .. md-tab-item:: Example .. code-block:: python - ALERT_REVIEW = False + ALERT_REVIEW = True .. note:: Email configuration takes place in ``/opt/geotrek-admin/var/conf/custom.py``, where you control recipients emails (``ADMINS``, ``MANAGERS``) and email server configuration. @@ -266,9 +276,10 @@ Buffer around treks to intersects POIs (works only without dynamic segmentation) .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python TREK_POI_INTERSECTION_MARGIN = 500 # meters + .. md-tab-item:: Example .. code-block:: python @@ -291,17 +302,39 @@ Then run ``sudo dpkg-reconfigure -pcritical geotrek-admin``. You can also insert diving minimal data (default practices, difficulties, levels and group permissions values): -.. code-block:: bash +.. md-tab-set:: + :name: loaddata-diving-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/basic.json + cp /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/upload/* /opt/geotrek-admin/var/media/upload/ + + .. md-tab-item:: With Docker - sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/basic.json - cp /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/upload/* /opt/geotrek-admin/var/media/upload/ + .. code-block:: python + + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/basic.json + cp /opt/geotrek-admin/lib/python*/site-packages/geotrek/diving/fixtures/upload/* /opt/geotrek-admin/var/media/upload/ You can insert licenses of attachments with this command : -.. code-block:: bash +.. md-tab-set:: + :name: loaddata-license-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/common/fixtures/licenses.json - sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/common/fixtures/licenses.json + .. md-tab-item:: With Docker + .. code-block:: python + + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/common/fixtures/licenses.json Land ----- @@ -309,14 +342,15 @@ Land You can insert circulation and authorization types with this command : .. md-tab-set:: - :name: loaddata-tabs + :name: loaddata-circulation-tabs - .. md-tab-item:: Default configuration + .. md-tab-item:: With Debian - .. code-block:: bash + .. code-block:: bash sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/land/fixtures/circulations.json - .. md-tab-item:: Example + + .. md-tab-item:: With Docker .. code-block:: python @@ -340,9 +374,21 @@ Then run ``sudo dpkg-reconfigure -pcritical geotrek-admin``. You can also insert Outdoor minimal data: -.. code-block:: bash +.. md-tab-set:: + :name: loaddata-outdoor-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/outdoor/fixtures/basic.json + + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/outdoor/fixtures/basic.json - sudo geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/outdoor/fixtures/basic.json After installing Outdoor module, you have to add permissions to your user groups on outdoor sites and courses. @@ -372,10 +418,22 @@ Example:: You can insert rules of sensitive area with these commands: -.. code-block:: bash +.. md-tab-set:: + :name: loaddata-outdoor-tabs + + .. md-tab-item:: With Debian + + .. code-block:: bash + + 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 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/ + .. md-tab-item:: With Docker + + .. code-block:: python + + docker compose run --rm web ./manage.py 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/ The following settings are related to sensitive areas: @@ -389,14 +447,15 @@ Default radius of sensitivity bubbles when not specified for species .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python - ENSITIVITY_DEFAULT_RADIUS = 100 # meters + SENSITIVITY_DEFAULT_RADIUS = 100 # meters + .. md-tab-item:: Example .. code-block:: python - ENSITIVITY_DEFAULT_RADIUS = 200 # meters + SENSITIVITY_DEFAULT_RADIUS = 200 # meters Sensitive area intersection margin @@ -409,9 +468,10 @@ Buffer around treks to intersects sensitive areas .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python SENSITIVE_AREA_INTERSECTION_MARGIN = 500 # meters + .. md-tab-item:: Example .. code-block:: python @@ -420,8 +480,10 @@ Buffer around treks to intersects sensitive areas .. notes - # Take care if you change this value after adding data. You should update buffered geometry in sql. - ``` UPDATE sensitivity_sensitivearea SET geom_buffered = ST_BUFFER(geom, ); ``` + # Take care if you change this value after adding data. You should update buffered geometry in SQL. + ```UPDATE sensitivity_sensitivearea SET geom_buffered = ST_BUFFER(geom, );``` -See :ref:`sensitive-areas-import` to import data. +.. seealso:: + + See :ref:`sensitive-areas-import` to import data. diff --git a/docs/advanced-configuration/settings-for-geotrek-mobile.rst b/docs/advanced-configuration/settings-for-geotrek-mobile.rst index bfad458ed8..6b12d560d2 100644 --- a/docs/advanced-configuration/settings-for-geotrek-mobile.rst +++ b/docs/advanced-configuration/settings-for-geotrek-mobile.rst @@ -4,6 +4,9 @@ Settings for Geotrek-mobile ============================ +See the default values in `geotrek/settings/base.py `_ for the complete list of available parameters. + + SYNC_MOBILE_ROOT ----------------- @@ -27,24 +30,35 @@ Options of the sync_mobile command. .. md-tab-item:: Default configuration - .. code-block:: python + .. code-block:: python - SYNC_MOBILE_OPTIONS = {'skip_tiles': True} + SYNC_MOBILE_OPTIONS = {'skip_tiles': False} .. md-tab-item:: Example .. code-block:: python - SYNC_MOBILE_OPTIONS = {'skip_tiles': False} + SYNC_MOBILE_OPTIONS = {'skip_tiles': True} MOBILE_NUMBER_PICTURES_SYNC ---------------------------- Number max of pictures that will be displayed and synchronized for each object (trek, POI, etc.) in the mobile app. -Example:: +.. md-tab-set:: + :name: sync-mobile-pictures-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + MOBILE_NUMBER_PICTURES_SYNC = 3 + + .. md-tab-item:: Example - MOBILE_NUMBER_PICTURES_SYNC = 3 + .. code-block:: python + + MOBILE_NUMBER_PICTURES_SYNC = 5 MOBILE_TILES_URL ----------------- @@ -64,14 +78,30 @@ MOBILE_LENGTH_INTERVALS Intervals of the mobile for the length filter. -Example:: +.. md-tab-set:: + :name: mobile-length-intervals-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + MOBILE_LENGTH_INTERVALS = [ + {"id": 1, "name": "< 10 km", "interval": [0, 9999]}, + {"id": 2, "name": "10 - 30", "interval": [9999, 29999]}, + {"id": 3, "name": "30 - 50", "interval": [30000, 50000]}, + {"id": 4, "name": "> 50 km", "interval": [50000, 999999]} + ] + + .. md-tab-item:: Example - MOBILE_LENGTH_INTERVALS = [ - {"id": 1, "name": "< 10 km", "interval": [0, 9999]}, - {"id": 2, "name": "10 - 30", "interval": [9999, 29999]}, - {"id": 3, "name": "30 - 50", "interval": [30000, 50000]}, - {"id": 4, "name": "> 50 km", "interval": [50000, 999999]} - ] + .. code-block:: python + + MOBILE_LENGTH_INTERVALS = [ + {"id": 1, "name": "< 5 km", "interval": [0, 4999]}, + {"id": 2, "name": "5 - 10", "interval": [5000, 9999]}, + {"id": 3, "name": "10 - 50", "interval": [10000, 49999]}, + {"id": 4, "name": "> 50 km", "interval": [50000, 999999]} + ] .. note:: - Interval key is in meters. @@ -82,14 +112,30 @@ MOBILE_ASCENT_INTERVALS Intervals of the mobile for the ascent filter. -Example:: +.. md-tab-set:: + :name: mobile-ascent-intervals-tabs - MOBILE_ASCENT_INTERVALS = [ - {"id": 1, "name": "< 300 m", "interval": [0, 299]}, - {"id": 2, "name": "300 - 600", "interval": [300, 599]}, - {"id": 3, "name": "600 - 1000", "interval": [600, 999]}, - {"id": 4, "name": "> 1000 m", "interval": [1000, 9999]} - ] + .. md-tab-item:: Default configuration + + .. code-block:: python + + MOBILE_ASCENT_INTERVALS = [ + {"id": 1, "name": "< 300 m", "interval": [0, 299]}, + {"id": 2, "name": "300 - 600", "interval": [300, 599]}, + {"id": 3, "name": "600 - 1000", "interval": [600, 999]}, + {"id": 4, "name": "> 1000 m", "interval": [1000, 9999]} + ] + + .. md-tab-item:: Example + + .. code-block:: python + + MOBILE_ASCENT_INTERVALS = [ + {"id": 1, "name": "< 100 m", "interval": [0, 99]}, + {"id": 2, "name": "100 - 300", "interval": [99, 299]}, + {"id": 3, "name": "300 - 600", "interval": [300, 599]}, + {"id": 4, "name": "> 600 m", "interval": [600, 9999]} + ] .. note:: Do the same as above @@ -99,15 +145,32 @@ MOBILE_DURATION_INTERVALS Intervals of the mobile for the duration filter. -Example:: +.. md-tab-set:: + :name: mobile-duration-intervals-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + MOBILE_DURATION_INTERVALS = [ + {"id": 1, "name": "< 1 heure", "interval": [0, 1]}, + {"id": 2, "name": "1h - 2h30", "interval": [1, 2.5]}, + {"id": 3, "name": "2h30 - 5h", "interval": [2.5, 5]}, + {"id": 4, "name": "5h - 9h", "interval": [5, 9]}, + {"id": 5, "name": "> 9h", "interval": [9, 9999999]} + ] - MOBILE_DURATION_INTERVALS = [ - {"id": 1, "name": "< 1 heure", "interval": [0, 1]}, - {"id": 2, "name": "1h - 2h30", "interval": [1, 2.5]}, - {"id": 3, "name": "2h30 - 5h", "interval": [2.5, 5]}, - {"id": 4, "name": "5h - 9h", "interval": [5, 9]}, - {"id": 5, "name": "> 9h", "interval": [9, 9999999]} - ] + .. md-tab-item:: Example + + .. code-block:: python + + MOBILE_DURATION_INTERVALS = [ + {"id": 1, "name": "< 1 heure", "interval": [0, 1]}, + {"id": 2, "name": "1h - 3h30", "interval": [1, 3.5]}, + {"id": 3, "name": "3h30 - 5h", "interval": [3.5, 5]}, + {"id": 4, "name": "5h - 10h", "interval": [5, 10]}, + {"id": 5, "name": "> 10h", "interval": [10, 9999999]} + ] .. note:: Check ``MOBILE_LENGTH_INTERVALS`` section to use it, here interval correspond to 1 unit of hour @@ -117,21 +180,41 @@ ENABLED_MOBILE_FILTERS List of all the filters enabled on mobile. -Example:: +.. md-tab-set:: + :name: enabled-mobile-filters-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + ENABLED_MOBILE_FILTERS = [ + 'practice', + 'difficulty', + 'duration', + 'ascent', + 'length', + 'themes', + 'route', + 'districts', + 'cities', + 'accessibilities', + ] + + .. md-tab-item:: Example + + .. code-block:: python + + ENABLED_MOBILE_FILTERS = [ + 'practice', + 'difficulty', + 'duration', + 'length', + 'themes', + 'route', + 'accessibilities', + ] - ENABLED_MOBILE_FILTERS = [ - 'practice', - 'difficulty', - 'duration', - 'ascent', - 'length', - 'themes', - 'route', - 'districts', - 'cities', - 'accessibilities', - ] .. note:: - Remove any of the filters if you don't want one of them. It's useless to add other one. + Remove any of the filters if you don't want one of them. diff --git a/docs/advanced-configuration/settings-for-geotrek-rando.rst b/docs/advanced-configuration/settings-for-geotrek-rando.rst index 50cbb06e9e..1d269233af 100644 --- a/docs/advanced-configuration/settings-for-geotrek-rando.rst +++ b/docs/advanced-configuration/settings-for-geotrek-rando.rst @@ -4,6 +4,8 @@ Settings for Geotrek-rando =========================== +See the default values in `geotrek/settings/base.py `_ for the complete list of available parameters. + .. _distances: Distances @@ -60,9 +62,20 @@ Trek export POI list limit Limit of the number of POIs on treks PDF. -Example:: +.. md-tab-set:: + :name: trek-export-poi-list-tabs + + .. md-tab-item:: Default configuration - TREK_EXPORT_POI_LIST_LIMIT = 14 + .. code-block:: python + + TREK_EXPORT_POI_LIST_LIMIT = 14 + + .. md-tab-item:: Example + + .. code-block:: python + + TREK_EXPORT_POI_LIST_LIMIT = 20 .. note:: ``14`` is already a huge amount of POI, but it's possible to add more @@ -72,9 +85,20 @@ Trek export information desk list limit Limit of the number of information desks on treks PDF. -Example:: +.. md-tab-set:: + :name: trek-export-informationdesk-list-tabs + + .. md-tab-item:: Default configuration + + .. code-block:: python + + TREK_EXPORT_INFORMATION_DESK_LIST_LIMIT = 2 + + .. md-tab-item:: Example - TREK_EXPORT_INFORMATION_DESK_LIST_LIMIT = 14 + .. code-block:: python + + TREK_EXPORT_INFORMATION_DESK_LIST_LIMIT = 5 .. note:: You can put ``-1`` if you want all the information desks @@ -94,13 +118,13 @@ On the Geotrek-rando V2 website, treks practices will be displayed separately. .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_PRACTICE = True + SPLIT_TREKS_CATEGORIES_BY_PRACTICE = False .. md-tab-item:: Example .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_PRACTICE = False + SPLIT_TREKS_CATEGORIES_BY_PRACTICE = True .. note:: Field order for each practices in admin will be taken in account @@ -117,13 +141,13 @@ On the Geotrek-rando V2 website, accessibilites will be displayed separately. .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_ACCESSIBILITY = True + SPLIT_TREKS_CATEGORIES_BY_ACCESSIBILITY = False .. md-tab-item:: Example .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_ACCESSIBILITY = False + SPLIT_TREKS_CATEGORIES_BY_ACCESSIBILITY = True Split treks categories by itinerancy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -137,13 +161,13 @@ On the Geotrek-rando V2 website, if a trek has a children it will be displayed s .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_ITINERANCY = True + SPLIT_TREKS_CATEGORIES_BY_ITINERANCY = False .. md-tab-item:: Example .. code-block:: python - SPLIT_TREKS_CATEGORIES_BY_ITINERANCY = False + SPLIT_TREKS_CATEGORIES_BY_ITINERANCY = True Split dives categories by practice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -157,13 +181,13 @@ On the Geotrek-rando V2 website, dives practices will be displayed separately. .. code-block:: python - SPLIT_DIVES_CATEGORIES_BY_PRACTICE = False + SPLIT_DIVES_CATEGORIES_BY_PRACTICE = True .. md-tab-item:: Example .. code-block:: python - SPLIT_DIVES_CATEGORIES_BY_PRACTICE = True + SPLIT_DIVES_CATEGORIES_BY_PRACTICE = False Hide published treks in topologies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -177,13 +201,13 @@ On the Geotrek-rando V2 website, treks near other are hidden. .. code-block:: python - HIDE_PUBLISHED_TREKS_IN_TOPOLOGIES = True + HIDE_PUBLISHED_TREKS_IN_TOPOLOGIES = False .. md-tab-item:: Example .. code-block:: python - HIDE_PUBLISHED_TREKS_IN_TOPOLOGIES = False + HIDE_PUBLISHED_TREKS_IN_TOPOLOGIES = True Trek with POIs pictures ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -197,13 +221,13 @@ It enables correlated pictures on Geotrek-rando V2 to be displayed in the slides .. code-block:: python - TREK_WITH_POIS_PICTURES = True + TREK_WITH_POIS_PICTURES = False .. md-tab-item:: Example .. code-block:: python - TREK_WITH_POIS_PICTURES = False + TREK_WITH_POIS_PICTURES = True Only external public PDF ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -217,13 +241,13 @@ On Geotrek-rando V2 website, only PDF imported with filetype "Topoguide"will be .. code-block:: python - ONLY_EXTERNAL_PUBLIC_PDF = True + ONLY_EXTERNAL_PUBLIC_PDF = False .. md-tab-item:: Example .. code-block:: python - ONLY_EXTERNAL_PUBLIC_PDF = False + ONLY_EXTERNAL_PUBLIC_PDF = True **Order of all the objects without practices on Geotrek-rando website** : diff --git a/docs/import-data/import-aggregator.rst b/docs/import-data/import-aggregator.rst index 07ddd9f6d9..f660f221a5 100644 --- a/docs/import-data/import-aggregator.rst +++ b/docs/import-data/import-aggregator.rst @@ -2,9 +2,9 @@ From other Geotrek (aggregator) =============================== -.. abstract:: Key words +.. abstract:: Keywords - ``Aggregator``, ``parsers``, ``cron`` + ``aggregator``, ``agrégateur``, ``parser``, ``cron`` .. _import-data-from-a-remote-geotrek-instance: diff --git a/docs/import-data/import-areas.rst b/docs/import-data/import-areas.rst index 198d61dc18..f3f6071988 100644 --- a/docs/import-data/import-areas.rst +++ b/docs/import-data/import-areas.rst @@ -2,6 +2,11 @@ Areas ====== +.. abstract:: Keywords + + ``Biodiv'Sport``, ``command line``, ``import en ligne de commande``, ``shapefile`` + + .. _import-cities: Load Cities @@ -316,7 +321,7 @@ Refer to :ref:`this section ` to learn about the av .. _sensitive-areas-import: -Sensitive areas Import +Sensitive areas import ======================= Geotrek-admin provides tools to import sensitive areas data when the module is enabled. The imports can be done through the web interface or the command line. Below are the available options: diff --git a/docs/import-data/import-dem-raster.rst b/docs/import-data/import-dem-raster.rst index 89f4b61c66..ec2c92f408 100644 --- a/docs/import-data/import-dem-raster.rst +++ b/docs/import-data/import-dem-raster.rst @@ -4,6 +4,11 @@ Altimetry (DEM) ================ +.. abstract:: Keywords + + ``DEM``, ``MNT``, ``raster``, ``QGIS`` + + Refer to :ref:`this section ` to learn about the available downloadable data sources. .. warning:: diff --git a/docs/import-data/import-other-data.rst b/docs/import-data/import-other-data.rst index 991f7c6f72..ee1556d5e4 100644 --- a/docs/import-data/import-other-data.rst +++ b/docs/import-data/import-other-data.rst @@ -2,6 +2,10 @@ From a file ============= +.. abstract:: Keywords + + ``command line``, ``import en ligne de commande`` + You can add parsers in your custom `parsers.py` file (``/opt/geotrek-admin/var/conf/parsers.py``) which will allow you to import data from files directly in your admin (superusers only). For example, some parsers are not available by default but you can use them adding some lines in your parsers file : diff --git a/docs/import-data/import-paths.rst b/docs/import-data/import-paths.rst index 381e5f4f80..13852211d8 100644 --- a/docs/import-data/import-paths.rst +++ b/docs/import-data/import-paths.rst @@ -4,6 +4,11 @@ Paths ======= +.. abstract:: Keywords + + ``command line``, ``import en ligne de commande``, ``QGIS`` + + .. ns-only:: .. diff --git a/docs/import-data/import-touristic-data-systems.rst b/docs/import-data/import-touristic-data-systems.rst index acfd57ecf8..e097a16546 100644 --- a/docs/import-data/import-touristic-data-systems.rst +++ b/docs/import-data/import-touristic-data-systems.rst @@ -4,6 +4,11 @@ Touristic Data Systems ======================= +.. abstract:: Keywords + + ``SIT``, ``parser``, ``command line``, ``import en ligne de commande`` + + Real-time integration ====================== diff --git a/docs/import-data/minimal-initial-data.rst b/docs/import-data/minimal-initial-data.rst index 6f131d9d0b..2eda3e30f3 100644 --- a/docs/import-data/minimal-initial-data.rst +++ b/docs/import-data/minimal-initial-data.rst @@ -4,6 +4,11 @@ Minimal initial data ====================== +.. abstract:: Keywords + + ``IGN``, ``INPN`` + + .. IMPORTANT:: These data are the minimal initial data required to have a functional Geotrek-admin after completing the :ref:`installation `.