diff --git a/pyproject.toml b/pyproject.toml index 0627b53ba..2385a1528 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,18 +13,18 @@ classifiers = [ ########## DEPENDENCIES ########## dependencies = [ - "Django==4.2.21", - "channels==4.2.2", - "channels-redis==4.2.1", + "Django==5.2.5", + "channels==4.3.1", + "channels-redis==4.3.0", "asyncio==3.4.3", "commonmark==0.9.1", "conference-scheduler==3.0.1", "django-allauth[mfa]==65.8.1", - "django-bootstrap5==25.1", + "django-bootstrap5==25.2", "django-colorfield==0.14.0", "django-cors-headers==4.7.0", "django-filter==25.1", - "django-leaflet==0.31.0", + "django-leaflet==0.32.0", "django-jsonview==2.0.0", "django-oauth-toolkit==3.0.1", "django-otp==1.6.0", diff --git a/src/backoffice/templates/facility_form.html b/src/backoffice/templates/facility_form.html index 81c4f45cb..346d61022 100644 --- a/src/backoffice/templates/facility_form.html +++ b/src/backoffice/templates/facility_form.html @@ -6,6 +6,7 @@ {% block extra_head %} {{ form.media }} {% leaflet_css plugins="forms" %} + {% leaflet_js plugins="forms" %} {{ mapData|json_script:"mapData" }} diff --git a/src/backoffice/templates/maps_feature_form.html b/src/backoffice/templates/maps_feature_form.html index 47d63436b..b39fe307f 100644 --- a/src/backoffice/templates/maps_feature_form.html +++ b/src/backoffice/templates/maps_feature_form.html @@ -9,6 +9,7 @@ {{ form.media }} {% leaflet_css plugins="forms" %} + {% leaflet_js plugins="forms" %} diff --git a/src/backoffice/views/facilities.py b/src/backoffice/views/facilities.py index afe0e1a04..d665a2d34 100644 --- a/src/backoffice/views/facilities.py +++ b/src/backoffice/views/facilities.py @@ -372,7 +372,6 @@ def get_form(self, *args, **kwargs): form.fields["location"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "class": "form-control", "geom_type": "Point", }, diff --git a/src/backoffice/views/maps.py b/src/backoffice/views/maps.py index 7706037d0..f1677e538 100644 --- a/src/backoffice/views/maps.py +++ b/src/backoffice/views/maps.py @@ -297,7 +297,6 @@ def get_form(self, *args, **kwargs): form.fields["geom"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "geom_type": "GeometryCollection", "class": "form-control", }, @@ -342,7 +341,6 @@ def get_form(self, *args, **kwargs): form.fields["geom"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "geom_type": "GeometryCollection", "class": "form-control", }, diff --git a/src/bornhack/settings.py b/src/bornhack/settings.py index 698462ca8..a8d0fce51 100644 --- a/src/bornhack/settings.py +++ b/src/bornhack/settings.py @@ -177,7 +177,6 @@ "debug_toolbar.panels.templates.TemplatesPanel", "debug_toolbar.panels.cache.CachePanel", "debug_toolbar.panels.signals.SignalsPanel", - "debug_toolbar.panels.logging.LoggingPanel", "debug_toolbar.panels.redirects.RedirectsPanel", ] diff --git a/src/economy/factories.py b/src/economy/factories.py index e67d0481a..e1fce043a 100644 --- a/src/economy/factories.py +++ b/src/economy/factories.py @@ -1,11 +1,11 @@ from __future__ import annotations import random +from datetime import timezone import factory import faker from django.contrib.auth.models import User -from django.utils import timezone from utils.slugs import unique_slugify from camps.models import Camp diff --git a/src/maps/templates/user_location_form.html b/src/maps/templates/user_location_form.html index efb178b3a..52b419e47 100644 --- a/src/maps/templates/user_location_form.html +++ b/src/maps/templates/user_location_form.html @@ -10,6 +10,7 @@ {% block extra_head %} {{ form.media }} {% leaflet_css plugins="forms" %} + {% leaflet_js plugins="forms" %} {{ mapData|json_script:"mapData" }} diff --git a/src/maps/views.py b/src/maps/views.py index dab8353a1..0960e7817 100644 --- a/src/maps/views.py +++ b/src/maps/views.py @@ -466,7 +466,6 @@ def get_form(self, *args, **kwargs) -> BaseForm: form.fields["location"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "geom_type": "Point", "class": "form-control", }, @@ -517,7 +516,6 @@ def get_form(self, *args, **kwargs) -> BaseForm: form.fields["location"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "geom_type": "Point", "class": "form-control", }, diff --git a/src/profiles/factories.py b/src/profiles/factories.py index 9baf6285f..68675d0db 100644 --- a/src/profiles/factories.py +++ b/src/profiles/factories.py @@ -40,6 +40,7 @@ class Meta: """Meta.""" model = User + skip_postgeneration_save = True profile = factory.RelatedFactory(ProfileFactory, "user") diff --git a/src/static_src/css/leaflet.css b/src/static_src/css/leaflet.css index 76139d234..cac93e760 100644 --- a/src/static_src/css/leaflet.css +++ b/src/static_src/css/leaflet.css @@ -182,6 +182,7 @@ /* visual tweaks */ .leaflet-container { + height: 500px; background: #ddd; outline: 0; } diff --git a/src/villages/templates/village_form.html b/src/villages/templates/village_form.html index d86fcf623..0205b80ec 100644 --- a/src/villages/templates/village_form.html +++ b/src/villages/templates/village_form.html @@ -10,6 +10,7 @@ {% block extra_head %} {{ form.media }} {% leaflet_css plugins="forms" %} + {% leaflet_js plugins="forms" %} {{ mapData|json_script:"mapData" }} diff --git a/src/villages/views.py b/src/villages/views.py index 7ad04cd49..2e8bc9c4f 100644 --- a/src/villages/views.py +++ b/src/villages/views.py @@ -168,7 +168,6 @@ def get_form(self, *args, **kwargs) -> ModelForm[Village]: form.fields["location"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "class": "form-control", "geom_type": "Point", }, @@ -229,7 +228,6 @@ def get_form(self, *args, **kwargs) -> ModelForm[Village]: form.fields["location"].widget = LeafletWidget( attrs={ "display_raw": "true", - "map_height": "500px", "class": "form-control", "geom_type": "Point", },