diff --git a/.gitignore b/.gitignore index efb609d9..5e16b3ce 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ site/* node_modules umap.conf data +static ### Python ### # Byte-compiled / optimized / DLL files diff --git a/pyproject.toml b/pyproject.toml index c8c80e93..3fa6d9e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ classifiers = [ dependencies = [ "Django==4.2", "django-agnocomplete==2.2.0", - "django-compressor==4.3.1", "django-environ==0.10.0", "django-probes==1.7.0", "Pillow==10.0.1", diff --git a/umap/settings/base.py b/umap/settings/base.py index 7437f416..b890d7fc 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -119,7 +119,6 @@ INSTALLED_APPS = ( "django.contrib.gis", "django_probes", "umap", - "compressor", "social_django", # See https://github.com/peopledoc/django-agnocomplete/commit/26eda2dfa4a2f8a805ca2ea19a0c504b9d773a1c # Django does not find the app config in the default place, so the app is not loaded @@ -163,9 +162,16 @@ MEDIA_ROOT = os.path.join("uploads") STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", - "compressor.finders.CompressorFinder", ] STATICFILES_DIRS = [] # May be extended when using UMAP_CUSTOM_STATICS +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "umap.utils.UmapManifestStaticFilesStorage", + }, +} # ============================================================================= # Templates @@ -262,9 +268,6 @@ LEAFLET_ZOOM = env.int("LEAFLET_ZOOM", default=6) # ============================================================================= # Third party app settings # ============================================================================= -COMPRESS_ENABLED = True -COMPRESS_OFFLINE = True - LOGIN_URL = "login" SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/" diff --git a/umap/settings/local.py.sample b/umap/settings/local.py.sample index 10e725ab..0fe412c8 100644 --- a/umap/settings/local.py.sample +++ b/umap/settings/local.py.sample @@ -29,9 +29,6 @@ DATABASES = { } } -COMPRESS_ENABLED = False -COMPRESS_OFFLINE = True - LANGUAGE_CODE = "en" # Set to False if login into django account should not be possible. You can diff --git a/umap/templates/base.html b/umap/templates/base.html index 97007244..50e83fac 100644 --- a/umap/templates/base.html +++ b/umap/templates/base.html @@ -1,4 +1,4 @@ -{% load compress umap_tags i18n %} +{% load umap_tags i18n static %}
@@ -17,13 +17,13 @@ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> {# See https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs #} + href="{% static 'umap/favicons/apple-touch-icon.png' %}"> diff --git a/umap/templates/umap/about_summary.html b/umap/templates/umap/about_summary.html index 870047eb..b95bb3a3 100644 --- a/umap/templates/umap/about_summary.html +++ b/umap/templates/umap/about_summary.html @@ -1,9 +1,9 @@ -{% load i18n %} +{% load i18n static %}