From a61751e1fbb8a30804054042927304bd2b250062 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 6 Feb 2024 18:52:46 +0000 Subject: [PATCH] remove // in URLs --- _deploy/wsl/localsettingsWSL.py | 17 ++++++------ deprecations.txt | 2 -- requirements.txt | 48 ++++++++++++++++++--------------- templates/base.html | 2 +- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/_deploy/wsl/localsettingsWSL.py b/_deploy/wsl/localsettingsWSL.py index 60d1c56..335a724 100644 --- a/_deploy/wsl/localsettingsWSL.py +++ b/_deploy/wsl/localsettingsWSL.py @@ -52,18 +52,17 @@ TEMPLATE_PATH = TROGGLE_PATH / "templates" MEDIA_ROOT = TROGGLE_PATH / "media" JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility +# FILES = Path('/mnt/d/expofiles/') EXPOFILES = REPOS_ROOT_PATH / "expofiles" SCANS_ROOT = EXPOFILES / "surveyscans" -PHOTOS_ROOT = Path("/mnt/d/EXPO/PHOTOS") +PHOTOS_ROOT = EXPOFILES / "photos" PHOTOS_YEAR = "2023" NOTABLECAVESHREFS = ["290", "291", "264", "258", "204", "359", "76", "107"] PYTHON_PATH = REPOS_ROOT_PATH / "troggle" LOGFILE = PYTHON_PATH / "troggle.log" -SQLITEDB = PYTHON_PATH / "troggle.sqlite" -KMZ_ICONS_PATH = PYTHON_PATH / "kmz_icons" # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). @@ -86,17 +85,17 @@ JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility # --------------------- MEDIA redirections END --------------------- PUBLIC_SITE = True -DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES ! -CACHEDPAGES = True # experimental page cache for a handful of page types +DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES ! +CACHEDPAGES = True # experimental page cache for a handful of page types # executables: -CAVERN = "cavern" # for parsing .svx files and producing .3d files +CAVERN = "cavern" # for parsing .svx files and producing .3d files SURVEXPORT = "survexport" # for parsing .3d files and producing .pos files DBSQLITE = { "default": { "ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - "NAME": str(SQLITEDB), + "NAME": "/home/philip/p11d5/troggle.sqlite", # 'NAME' : ':memory:', "USER": "expo", # Not used with sqlite3. "PASSWORD": "sekrit", # Not used with sqlite3. @@ -134,7 +133,7 @@ TEMPLATES = [ "context_processors": [ # django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token "django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions - "core.context.troggle_context", # in core/troggle.py - only used in expedition.html + "core.context.troggle_context", # in core/context.py - only used in expedition.html "django.template.context_processors.debug", "django.template.context_processors.i18n", "django.template.context_processors.media", # includes a variable MEDIA_URL @@ -168,7 +167,7 @@ EXPOWEB = REPOS_ROOT_PATH / "expoweb" CAVEDESCRIPTIONS = EXPOWEB / "cave_data" ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data" -EXPOWEB_URL = "" +# EXPOWEB_URL = "" # defunct, removed. # SCANS_URL = '/survey_scans/' # defunct, removed. sys.path.append(str(REPOS_ROOT_PATH)) diff --git a/deprecations.txt b/deprecations.txt index 26bd153..e69de29 100644 --- a/deprecations.txt +++ b/deprecations.txt @@ -1,2 +0,0 @@ -/home/philip/p11d42/lib/python3.11/site-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. - warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) diff --git a/requirements.txt b/requirements.txt index 1a5abb1..94005d7 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,27 @@ -#This requirements txt matches the libaries as of 2023-07-09 on expo.survex.com - -#Nb on the server asgiref==3.3.0, however this conflicts with the Django==3.2.12 requirement -asgiref==3.3.2 -Django==3.2.12 -docutils==0.16 -packaging==20.9 -Pillow==8.1.2 -pytz==2021.1 -sqlparse==0.4.1 -Unidecode==1.2.0 -beautifulsoup4==4.9.3 +asgiref==3.7.2 +attrs==22.2.0 +beautifulsoup4==4.12.2 +black==23.11.0 +bs4==0.0.1 +click==8.1.3 +colorama==0.4.6 +coverage==6.5.0 +Django==5.0 +docutils==0.20 +interrogate==1.5.0 +isort==5.11.4 +mypy-extensions==0.4.3 +packaging==23.2 +pathspec==0.10.3 piexif==1.1.3 - -#Not installed on expo.survex.com -#black==23.3 -#click==8.1.3 -#coverage==7.2 -#isort==5.12.0 -#mypy-extensions==1.0.0 -#pathspec==0.11 -#platformdirs==3.8 -#ruff==0.0.245 +Pillow==10.1.0 +platformdirs==2.6.2 +py==1.11.0 +pytz==2022.6 +ruff==0.1.0 +soupsieve==2.5 +sqlparse==0.4.0 +tabulate==0.9.0 +toml==0.10.2 +typing_extensions==4.4.0 +Unidecode==1.3.6 diff --git a/templates/base.html b/templates/base.html index dfe05d3..636afa4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -31,7 +31,7 @@ {% else %}