Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9e2599b
django-mapentity integration
kayarhabby Jul 15, 2025
d8e3454
mise en commentaire des fichiers js leaflet
kayarhabby Jul 15, 2025
26c158f
Mise en place des préenregistrement dans le layers control
kayarhabby Jul 16, 2025
af4c5df
chargement de la quasi totalité des modèles sur la carte
kayarhabby Jul 22, 2025
192088b
mise à jour des fichiers main des modules geotrek
kayarhabby Jul 24, 2025
e64b6a8
update style dynamique
kayarhabby Jul 25, 2025
230e9a4
update trek
kayarhabby Jul 28, 2025
8ce8413
réorganisation du projet, suppression des fichiers non utilisés et re…
kayarhabby Jul 29, 2025
1c13a71
update
kayarhabby Jul 30, 2025
6724ef6
update
kayarhabby Jul 30, 2025
c3a748a
update
kayarhabby Jul 31, 2025
bd7747b
update
kayarhabby Aug 6, 2025
b99e9a1
update trek_detail
kayarhabby Aug 6, 2025
3a0cd66
update
kayarhabby Aug 7, 2025
2622883
Use MapEntity update-leaflet-maplibre-updated branch
PartyNell Jan 13, 2026
b9ccf78
Fix quality
PartyNell Jan 13, 2026
44bae08
Replace LEAFLET_CONFIG by MAPLIBRE_CONFIG_OVERRIDES
PartyNell Jan 15, 2026
ed629df
refactor: migrate from Leaflet to Maplibre for GISModelAdmin integration
submarcos Feb 4, 2026
c2391fa
fix(trans): update POT-Creation-Date and add new translation for "Com…
submarcos Feb 5, 2026
1321401
Fix translation files
submarcos Feb 5, 2026
49cdcd0
fix(trans): add translations for "Districts" and "Cities" in djangojs.po
submarcos Feb 5, 2026
2f2cd63
Fix translation files
submarcos Feb 5, 2026
220249e
refactor: update bbox selection script for MapLibre integration and a…
submarcos Feb 5, 2026
52bc75f
refactor: streamline BladeForm topology field initialization and impr…
submarcos Feb 5, 2026
281b9a2
refactor: reorder fields in TopologyForm for improved structure and c…
submarcos Feb 5, 2026
aded90d
feat: integrate django-mapbox-baselayer and update map configuration
submarcos Feb 11, 2026
50f4a86
feat: integrate django-mapbox-baselayer and update map configuration
submarcos Feb 12, 2026
e004e35
feat: update map styling and integrate new SVG icons for parking and …
submarcos Feb 13, 2026
2c46c7e
feat: enhance map functionality with marker visibility control and pa…
submarcos Feb 13, 2026
c8cb96d
refactor: simplify docker-compose.yml by removing unused postgres ser…
submarcos Feb 17, 2026
379bb95
refactor: simplify docker-compose.yml by removing unused postgres ser…
submarcos Feb 17, 2026
2817cc9
feat: add SensitivityVectorLayer for handling sensitive area vector t…
submarcos Feb 19, 2026
5001e9c
feat: add SensitivityVectorLayer for handling sensitive area vector t…
submarcos Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,473 changes: 1 addition & 2,472 deletions .gitignore

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ quality: lint format

messages:
$(docker_compose) run --rm web ./manage.py makemessages -a --no-location --no-obsolete --no-wrap --ignore var/cache
$(docker_compose) run --rm web ./manage.py makemessages -a --no-location --no-obsolete --no-wrap -d djangojs --ignore var/cache

compilemessages:
$(docker_compose) run --rm web ./manage.py compilemessages
Expand Down
68 changes: 0 additions & 68 deletions cypress/integration/nav_authent.js

This file was deleted.

24 changes: 0 additions & 24 deletions cypress/integration/nav_b_language.js

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
timeout: 5s

redis:
image: redis:5.0-alpine
image: redis:alpine
volumes:
- redis:/data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
});
});

$(window).on('detailmap:ready', function () {
$(window).on('entity:map:detail', function (e) {
$('#altitudegraph').append('<img src="{% url profile_url LANGUAGE_CODE object.pk %}">');
});
</script>
2 changes: 1 addition & 1 deletion geotrek/api/management/commands/sync_mobile.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def sync_global_tiles(self, zipfile):
self.stdout.write("\x1b[36m**\x1b[0m \x1b[1mtiles/\x1b[0m ...", ending="")
self.stdout._out.flush()

global_extent = settings.LEAFLET_CONFIG["SPATIAL_EXTENT"]
global_extent = [coord for coords in settings.BOUNDS for coord in coords]

logger.info("Global extent is %s", global_extent)
logger.info("Build global tiles file...")
Expand Down
25 changes: 25 additions & 0 deletions geotrek/common/locale/de/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
25 changes: 25 additions & 0 deletions geotrek/common/locale/en/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
25 changes: 25 additions & 0 deletions geotrek/common/locale/es/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
25 changes: 25 additions & 0 deletions geotrek/common/locale/fr/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
25 changes: 25 additions & 0 deletions geotrek/common/locale/it/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
25 changes: 25 additions & 0 deletions geotrek/common/locale/nl/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-05 10:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "<script>"
msgstr ""

msgid "<div>"
msgstr ""
30 changes: 30 additions & 0 deletions geotrek/common/mixins/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import shutil
import uuid

import mercantile
from django.conf import settings
from django.contrib.gis.geos import Polygon
from django.core.exceptions import FieldError
from django.core.files.storage import default_storage
from django.core.mail import mail_managers
from django.db import models
Expand All @@ -18,6 +21,7 @@
from easy_thumbnails.alias import aliases
from easy_thumbnails.files import get_thumbnailer
from mapentity.models import MapEntityMixin
from mapentity.settings import app_settings
from modeltranslation.utils import build_localized_fieldname

from geotrek.common.mixins.managers import NoDeleteManager
Expand Down Expand Up @@ -58,6 +62,32 @@ def last_update_and_count(self):
last_update=Max("date_update"), count=Count("pk")
)

@classmethod
def latest_updated_with_count(cls, **kwargs):
try:
qs = cls.objects.all()

z, x, y = kwargs.get("z"), kwargs.get("x"), kwargs.get("y")
if z is not None and x is not None and y is not None:
extent = Polygon.from_bbox(mercantile.xy_bounds(int(x), int(y), int(z)))
extent.srid = 3857

# Get the SRID of the geometry field to transform extent to the correct SRID
geom_field = app_settings["GEOM_FIELD_NAME"]
geom_field_obj = cls._meta.get_field(geom_field)
target_srid = getattr(geom_field_obj, "srid", 4326) or 4326
extent.transform(target_srid)
qs = qs.filter(**{f"{geom_field}__intersects": extent})

# Aggregate Max date and Count in one query

date_field = app_settings["DATE_UPDATE_FIELD_NAME"]
agg = qs.aggregate(latest=Max(date_field), count=Count("pk"))
return agg["latest"], agg["count"]

except (cls.DoesNotExist, FieldError):
return None, 0

@classmethod
def latest_updated(cls):
try:
Expand Down
18 changes: 0 additions & 18 deletions geotrek/common/static/common/css/points_reference.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ <h3>{% trans "Photos accessibility" %}</h3>
data-confirm-delete-msg="{% trans "Are you sure to delete this file {file} ?" %}"
data-confirm-delete-close-button="{% trans "Cancel" %}"
data-confirm-delete-confirm-button="{% trans "Delete" %}"></div>
<script type="text/javascript" src="{% static "trekking/attachment_accessibility.js" %}"></script>

<script type="text/javascript" src="{% static "trekking/js/attachment_accessibility.js" %}"></script>
Loading