diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-03-08 18:24:57 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-03-08 18:24:57 +0000 |
commit | b3d9eeecd2fbd79126bc865feadc1676e8f47e31 (patch) | |
tree | 7ae15b48d4a230c9adc1886449e64ca1e45c08be /_deploy/wsl | |
parent | 301fa1fce18a578fbef23a09a758dda0c6ba35a9 (diff) | |
download | troggle-b3d9eeecd2fbd79126bc865feadc1676e8f47e31.tar.gz troggle-b3d9eeecd2fbd79126bc865feadc1676e8f47e31.tar.bz2 troggle-b3d9eeecd2fbd79126bc865feadc1676e8f47e31.zip |
fixing paths in settings to be Path() not str()
Diffstat (limited to '_deploy/wsl')
-rw-r--r-- | _deploy/wsl/localsettingsWSL.py | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/_deploy/wsl/localsettingsWSL.py b/_deploy/wsl/localsettingsWSL.py index 7998996..8308c6e 100644 --- a/_deploy/wsl/localsettingsWSL.py +++ b/_deploy/wsl/localsettingsWSL.py @@ -46,7 +46,6 @@ PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor) # --------------------- MEDIA redirections BEGIN --------------------- REPOS_ROOT_PATH = Path(__file__).parent.parent LIBDIR = REPOS_ROOT_PATH / "lib" / PV -# LIBDIR = REPOS_ROOT_PATH / 'lib' / 'python3.9' TROGGLE_PATH = Path(__file__).parent TEMPLATE_PATH = TROGGLE_PATH / "templates" @@ -58,7 +57,12 @@ EXPOFILES = REPOS_ROOT_PATH / "expofiles" SCANS_ROOT = EXPOFILES / "surveyscans" PHOTOS_ROOT = EXPOFILES / "photos" -PHOTOS_YEAR = "2022" +PHOTOS_YEAR = "2023" +NOTABLECAVESHREFS = ["290", "291", "264", "258", "204", "359", "76", "107"] + + +PYTHON_PATH = REPOS_ROOT_PATH / "troggle" +LOGFILE = PYTHON_PATH / "troggle.log" # 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). @@ -118,11 +122,6 @@ if DBSWITCH == "sqlite": if DBSWITCH == "mariadb": DATABASES = DBMARIADB -NOTABLECAVESHREFS = ["290", "291", "359", "264", "258", "204", "76", "107"] - -PYTHON_PATH = REPOS_ROOT_PATH / "troggle" - -LOGFILE = PYTHON_PATH / "troggle.log" TEMPLATES = [ @@ -165,29 +164,18 @@ DEFAULT_FROM_EMAIL = "django-test@klebos.net" SURVEX_DATA = REPOS_ROOT_PATH / "loser" DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings" EXPOWEB = REPOS_ROOT_PATH / "expoweb" - CAVEDESCRIPTIONS = EXPOWEB / "cave_data" ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data" + EXPOWEB_URL = "" # SCANS_URL = '/survey_scans/' # defunct, removed. -# Sanitise these to be strings as all other code is expecting strings -# and we have not made the change to pathlib Path type in the other localsettings-* variants yet. -# CAVEDESCRIPTIONS = str(CAVEDESCRIPTIONS) -# ENTRANCEDESCRIPTIONS = str(ENTRANCEDESCRIPTIONS) -# LOGFILE = str(LOGFILE) -# EXPOWEB = str(EXPOWEB) -# DRAWINGS_DATA = str(DRAWINGS_DATA) -# SURVEX_DATA = str(SURVEX_DATA) -# TEMPLATE_PATH = str(TROGGLE_PATH) -# MEDIA_ROOT = str(MEDIA_ROOT) -# JSLIB_ROOT = str(JSLIB_ROOT) -# SCANS_ROOT = str(SCANS_ROOT) -# EXPOFILES = str(EXPOFILES) -# PHOTOS_ROOT = str(PHOTOS_ROOT) -STATIC_URL = str(STATIC_URL) + "/" -MEDIA_URL = str(MEDIA_URL) + "/" -# PYTHON_PATH = str(PYTHON_PATH) -# REPOS_ROOT_PATH = str(REPOS_ROOT_PATH) sys.path.append(str(REPOS_ROOT_PATH)) sys.path.append(str(PYTHON_PATH)) +#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed +#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed + +# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't +STATIC_URL = str(STATIC_URL) + "/" +MEDIA_URL = str(MEDIA_URL) + "/" + |