summaryrefslogtreecommitdiffstats
path: root/_deploy
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-06-25 20:01:43 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-06-25 20:01:43 +0300
commit451326789b746936367eb3fdbdefe667425b27c5 (patch)
tree5b00e52cf1a72f4add83b0a27ee1a328064079d3 /_deploy
parent859ae9d8259e8c15091ebe60879a12e2e0fd576a (diff)
downloadtroggle-451326789b746936367eb3fdbdefe667425b27c5.tar.gz
troggle-451326789b746936367eb3fdbdefe667425b27c5.tar.bz2
troggle-451326789b746936367eb3fdbdefe667425b27c5.zip
updated packages and settings
Diffstat (limited to '_deploy')
-rw-r--r--_deploy/wsl/localsettingsWSL.py34
1 files changed, 26 insertions, 8 deletions
diff --git a/_deploy/wsl/localsettingsWSL.py b/_deploy/wsl/localsettingsWSL.py
index 2673b99..c57a35b 100644
--- a/_deploy/wsl/localsettingsWSL.py
+++ b/_deploy/wsl/localsettingsWSL.py
@@ -33,7 +33,7 @@ EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
-EXPOFILESREMOTE = True # if True, then re-routes urls in expofiles to remote sever. Tests are then less accurate.
+EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever. Tests are then less accurate.
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = '8000' # not needed
@@ -56,7 +56,7 @@ JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS ut
#FILES = Path('/mnt/d/expofiles/')
EXPOFILES = Path('/mnt/d/EXPO/expofiles/')
-SURVEY_SCANS = EXPOFILES / 'surveyscans'
+SCANS_ROOT = EXPOFILES / 'surveyscans'
PHOTOS_ROOT = EXPOFILES / 'photos'
PHOTOS_YEAR = "2022"
@@ -68,8 +68,9 @@ DIR_ROOT = ''#this should end in / if a value is given
URL_ROOT = '/'
# URL_ROOT = 'http://localhost:'+ SERVERPORT +'/'
+#Note that these constants are not actually used in urls.py, they should be..
MEDIA_URL = urllib.parse.urljoin(URL_ROOT , '/site_media/')
-SURVEYS_URL = urllib.parse.urljoin(URL_ROOT , '/survey_scans/')
+SCANS_URL = urllib.parse.urljoin(URL_ROOT , '/survey_scans/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT , '/photos/')
SVX_URL = urllib.parse.urljoin(URL_ROOT , '/survex/')
@@ -88,7 +89,7 @@ CACHEDPAGES = True # experimental page cache for a handful of page types
CAVERN = 'cavern' # for parsing .svx files and producing .3d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
-DATABASES = {
+DBSQLITE = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle.sqlite',
@@ -99,7 +100,25 @@ DATABASES = {
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
-# add in 358 when they don't make it crash horribly
+DBMARIADB = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME' : 'troggle', # Or path to database file if using sqlite3.
+ 'USER' : 'expo',
+ 'PASSWORD' : 'my-secret-password-schwatzmooskogel',
+ 'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT' : '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
+# default database for me is squlite
+DBSWITCH = "sqlite"
+
+if DBSWITCH == "sqlite":
+ DATABASES = DBSQLITE
+if DBSWITCH == "mariadb":
+ DATABASES = DBMARIADB
+
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
PYTHON_PATH = REPOS_ROOT_PATH / 'troggle'
@@ -137,7 +156,6 @@ TEMPLATES = [
},
]
-# Passwords are loaded from credentials.py by settings.py
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
@@ -160,7 +178,7 @@ EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
EXPOWEB_URL = ''
-SURVEYS_URL = '/survey_scans/'
+SCANS_URL = '/survey_scans/'
# 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.
@@ -175,4 +193,4 @@ REPOS_ROOT_PATH = os.fspath(REPOS_ROOT_PATH)
TEMPLATE_PATH = os.fspath(TROGGLE_PATH)
MEDIA_ROOT = os.fspath(MEDIA_ROOT)
JSLIB_ROOT = os.fspath(JSLIB_ROOT)
-SURVEY_SCANS = os.fspath(SURVEY_SCANS)
+SCANS_ROOT = os.fspath(SCANS_ROOT)