Skip to content

Commit

Permalink
Merge branch 'master' into update_doc_translation
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Mar 26, 2024
2 parents 2992e96 + e3c53c7 commit 5214436
Show file tree
Hide file tree
Showing 256 changed files with 1,879 additions and 8,263 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.103.0+dev
2.103.2+dev
16 changes: 14 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
geotrek-admin (2.103.0+dev) UNRELEASED; urgency=medium
geotrek-admin (2.103.2+dev) UNRELEASED; urgency=medium

*

-- Célia Prat <[email protected]> Thu, 14 Mar 2024 11:14:42 +0100
-- Joaquim Nallar <[email protected]> Fri, 22 Mar 2024 16:27:57 +0100

geotrek-admin (2.103.2) RELEASED; urgency=medium

* New package release

-- Joaquim Nallar <[email protected]> Fri, 22 Mar 2024 16:03:23 +0100

geotrek-admin (2.103.1) RELEASED; urgency=medium

* New package release

-- Joaquim Nallar <[email protected]> Fri, 15 Mar 2024 16:21:41 +0100

geotrek-admin (2.103.0) RELEASED; urgency=medium

Expand Down
1 change: 1 addition & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-c requirements.txt

pip-tools
lxml
flake8
freezegun
coverage
Expand Down
8 changes: 6 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ click==8.1.3
# pip-tools
coverage==7.3.1
# via -r dev-requirements.in
django==3.2.24
django==3.2.25
# via
# -c requirements.txt
# django-debug-toolbar
# django-extensions
django-debug-toolbar==4.2.0
django-debug-toolbar==4.3.0
# via -r dev-requirements.in
django-extensions==3.2.3
# via -r dev-requirements.in
Expand All @@ -37,6 +37,10 @@ importlib-metadata==6.8.0
# via
# -c requirements.txt
# build
lxml==4.9.3
# via
# -c requirements.txt
# -r dev-requirements.in
mccabe==0.7.0
# via flake8
packaging==21.3
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ RUN apt-get update -qq && apt-get install -y -qq \
libpangocairo-1.0-0 \
libgdk-pixbuf2.0-dev \
libffi-dev \
fonts-dejavu-core \
libvips && \
apt-get install -y --no-install-recommends postgis && \
apt-get clean all && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt/*
Expand All @@ -62,6 +63,7 @@ FROM base as build
USER root

RUN apt-get update -qq && apt-get install -y -qq \
git \
python3.8-dev \
python3.8-venv \
build-essential \
Expand Down
39 changes: 38 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,46 @@
CHANGELOG
=========

2.103.0+dev (XXXX-XX-XX)
2.103.2+dev (XXXX-XX-XX)
------------------------

**Breaking changes**

- Geotrek-rando v2 support is deprecated, `sync_rando` command and Sync rando menu view are removed.

**Hot fix**

- Add git to Dockerfile build staging


2.103.2 (2024-03-22)
--------------------

**Bug fixes**

- Fix bug deleted blades still displayed on detail view of signages (fix #4003)
- Fix interferences on `practice` mapping in Aggregator by changing calls order in GeotrekOutdoorParser (refs #3569)

**Maintenance**

- Bump mapentity from 8.7.1 to 8.7.2

**Development**

- Add git to Dockerfile build staging


2.103.1 (2024-03-15)
--------------------

**Maintenance**

- Bump mapentity from 8.7.0 to 8.7.1

**Hot fix**

- Fix fonts in public PDF (docker image only)


2.103.0 (2024-03-14)
------------------------
Expand Down
46 changes: 0 additions & 46 deletions docs/install/advanced-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -932,18 +932,6 @@ Attributes for "zones sensibles réglementaires" are:
* ``url`` : card url. Optional.


Sync to Geotrek-rando
'''''''''''''''''''''''

Just run:

.. code-block :: bash
sudo geotrek sync_rando <parameters>
If sensitivity module is enabled, sensitive areas will be automatically synchronized.


Feedback reports settings
-------------------------

Expand Down Expand Up @@ -981,9 +969,6 @@ To initialize Report forms (Geotrek-admin, Geotrek-rando-V2, Geotrek-rando-V3) l
geotrek loaddata /opt/geotrek-admin/lib/python*/site-packages/geotrek/feedback/fixtures/basic.json
To make these lists available for your Geotrek-rando-V2, run ``sync_rando`` (see :ref:`synchronization <synchronization-section>`)


**2 - Suricate Standard**

This mode simply forwards all reports to Suricate, using the Standard API to post reports.
Expand Down Expand Up @@ -1136,8 +1121,6 @@ Load alerts from Suricate (located in your bounding box) :
geotrek sync_suricate -v 2 --no-notification
To make these lists available for your Geotrek-rando, run ``sync_rando`` (see :ref:`synchronization <synchronization-section>`)

- Then load extra required statuses for Reports and Interventions:

.. code-block :: python
Expand Down Expand Up @@ -2891,7 +2874,6 @@ Example of a customised template (``/opt/geotrek-admin/var/conf/extra_templates/
The default template may change in the future versions. You will be in charge of porting the modification to your copy.

Test your modifications by exporting a trek or a content to PDF from Geotrek-admin application.
To get your modifications available for Rando application, launch the ``sync_rando`` command.


PDF as booklet
Expand Down Expand Up @@ -2978,34 +2960,6 @@ You might also need to deploy logo images in the following places :
Settings for Geotrek-rando
--------------------------

Synchro Geotrek-rando
~~~~~~~~~~~~~~~~~~~~~
With Geotrek-rando V2, there is a synchronization mechanism to expose Geotrek-admin contents in json files generated automatically.

.. warning::
This is no more used in Geotrek-rando V3.


.. envvar:: SYNC_RANDO_ROOT

Path on your server where the data for Geotrek-rando website will be generated

Example::

SYNC_RANDO_ROOT = os.path.join(VAR_DIR, 'data')

.. note::
- If you want to modify it, do not forget to import os at the top of the file.
- Check `import Python <https://docs.python.org/3/reference/import.html>`_ , if you need any information

.. envvar:: SYNC_RANDO_OPTIONS

Options of the sync_rando command in Geotrek-admin interface.

Example::

SYNC_RANDO_OPTIONS = {}

.. _distances:

Distances
Expand Down
117 changes: 11 additions & 106 deletions docs/install/synchronization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,20 @@ Synchronization
:local:
:depth: 2

Manual synchronization
----------------------

To create data for Geotrek-rando (public web portal) and Geotrek-mobile (mobile phone app),
just run this command:

::

sudo geotrek sync_rando /opt/geotrek-admin/var/data

The parameter is the destination directory for synchronized data.
If you choose another directory, make sure the parent of this directory is writable by geotrek user.
Otherwise you will get a PermissionError message.

If Geotrek-admin is not accessible on localhost:80, you have to use the ``--url`` option.
To make output less or more verbose, you can use the ``--verbose`` option.
Geotrek-mobile app v3
---------------------

Since version 2.4.0 of Geotrek-admin, you can also launch the command ``sync_rando`` from the web interface.
You can add synchronization options with advanced configuration setting ``SYNC_RANDO_OPTIONS = {}``.
The Geotrek-mobile app v3 has its own API and synchronization command called ``sync_mobile``.

For example, if you add this line in ``/opt/geotrek-admin/var/conf/custom.py`` you will skip generation of map tiles files during the synchronisation :
``SYNC_RANDO_OPTIONS = {'skip_tiles': True}``
::

geotrek sync_mobile [-h] [--languages LANGUAGES] [--portal PORTAL]
[--skip-tiles] [--url URL] [--indent INDENT]
[--version] [-v {0,1,2,3}] [--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback]
[--no-color] [--force-color]
path

Automatic synchronization
-------------------------
Expand All @@ -39,81 +30,12 @@ You can set up automatic synchronization by creating a file ``/etc/cron.d/geotre

::

0 3 * * * root /usr/sbin/geotrek sync_rando /opt/geotrek-admin/var/data
0 3 * * * root /usr/sbin/geotrek sync_mobile /opt/geotrek-admin/var/data

This example will automatically synchronize data a 3 am every day.

Note: it is required to give the full path to the geotrek command since cron set the PATH only to `bin:/usr/bin`.

Synchronization options
-----------------------

::

Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output
-u URL, --url=URL Base URL of Geotrek-admin (eg. http://geotrek.myorganization.com)
-r URL, --rando-url=URL
Base URL of public Geotrek-rando website, used for static html versions of objects pages
generated for Facebook in meta folder of data API
-s SOURCE, --source=SOURCE
Filter by source(s)
-P PORTAL, --portal=PORTAL
Filter by portal(s)
-p, --skip-pdf Skip generation of PDF files
-t, --skip-tiles Skip generation of map tiles files for Geotrek-mobile app v2
-d, --skip-dem Skip generation of Digital Elevation Model files for 3D view
-e, --skip-profile-png
Skip generation of PNG elevation profile
-w, --with-touristicevents
Include touristic events by trek in global.zip for Geotrek-mobile v2
-c CONTENT_CATEGORIES, --with-touristiccontent-categories=CONTENT_CATEGORIES
Include touristic contents by trek in global.zip for Geotrek-mobile v2
(filtered by category ID ex: --with-touristiccontent-categories="1,2,3")
-g, --with-signages Include published signages
-i, --with-infrastructures
Include published infrastructures

Geotrek-mobile v3 uses its own synchronization command (see below).
If you are not using Geotrek-mobile v2 anymore, it is recommanded to use ``-t`` option to don't generate big offline tiles directories,
not used elsewhere than in Geotrek-mobile v2. Same for ``-w`` and ``-c`` option, only used for Geotrek-mobile v2.


Synchronization filtered by source and portal
---------------------------------------------

You can filter treks, touristic contents, touristic events and static pages by source(s).
For example, if you created 3 sources records named ``source A``, ``source B`` and ``source C``
and you want to only export data from ``source A`` and ``source B`` to your web public portal, you can synchronize with:

::

sudo geotrek sync_rando --source "source A,source B" dataAB

Multiple sources are separated with comas (without space before or after coma). Do not forget to add double quotes after and before the parameter
if there are spaces in source names.
You can run several commands to export several sources combinations into several directories and use them to publish several distinct web portals.

You can do exactly the same with ``Target_Portal`` field value. It will include objects associated to the selected portal + those without portal.

::

sudo geotrek sync_rando --portal "portal A" dataA


Synchronization filtered by touristic content categories
--------------------------------------------------------

In Geotrek-mobile v2, you can choose to also include touristic content per trek. You must specify ID categories :

::

sudo geotrek sync_rando --with-touristiccontent-categories="1,3"

Multiple categories are separated with comas (without space before or after coma).


Synchronization with a distant Geotrek-rando server
---------------------------------------------------
Expand All @@ -126,20 +48,3 @@ If you have separated servers, you have to copy files, for example with ``rsync`
::

rsync /path/of/generated/data other-server:/path/of/generated/data


Geotrek-mobile app v3
---------------------

The Geotrek-mobile app v3 has its own API and synchronization command called ``sync_mobile``.

It has similar parameters as ``sync_rando``:

::

sudo geotrek sync_mobile [-h] [--languages LANGUAGES] [--portal PORTAL]
[--skip-tiles] [--url URL] [--indent INDENT]
[--version] [-v {0,1,2,3}] [--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback]
[--no-color] [--force-color]
path
Loading

0 comments on commit 5214436

Please sign in to comment.