summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-01-16 23:22:15 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-01-16 23:22:15 +0000
commitea2f4526e8178f41efd19c4756aaac711ffd3d3f (patch)
tree144ca8137c035099d639a02b878cd9fec9a9f36d
parent9331d7e1db6953733cd3166197139e633da870cb (diff)
downloadtroggle-ea2f4526e8178f41efd19c4756aaac711ffd3d3f.tar.gz
troggle-ea2f4526e8178f41efd19c4756aaac711ffd3d3f.tar.bz2
troggle-ea2f4526e8178f41efd19c4756aaac711ffd3d3f.zip
new localsettings
-rw-r--r--_deploy/debian-server/localsettings-expo-live.py22
-rw-r--r--localsettings.py27
-rw-r--r--settings.py1
3 files changed, 28 insertions, 22 deletions
diff --git a/_deploy/debian-server/localsettings-expo-live.py b/_deploy/debian-server/localsettings-expo-live.py
index d1dd8a1..96998cd 100644
--- a/_deploy/debian-server/localsettings-expo-live.py
+++ b/_deploy/debian-server/localsettings-expo-live.py
@@ -1,6 +1,4 @@
-import os
import sys
-import urllib.parse
from pathlib import Path
"""Settings for a troggle installation which may vary among different
@@ -24,7 +22,17 @@ Edited 31/12/2024
print(" * importing troggle/localsettings.py")
-# DO NOT check this file into the git repo - it contains real passwords.
+EXPOUSER = 'expo'
+EXPOADMINUSER = 'expoadmin'
+EXPOUSER_EMAIL = 'wookey@wookware.org'
+EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
+from secret_credentials import *
+
+EMAIL_HOST = "smtp-auth.mythic-beasts.com"
+EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
+EMAIL_PORT = 587
+EMAIL_USE_TLS = True
+DEFAULT_FROM_EMAIL = "django-test@klebos.net"
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
@@ -36,18 +44,14 @@ DATABASES = {
"charset": "utf8mb4", # To permit emojis in logbook entries and elsewhere
}, 'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
- 'PASSWORD' : 'uFqP56B4XleeyIW', # Not used with sqlite3.
+ 'PASSWORD' : MARIADB_SERVER_PASSWORD, # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
-EXPOUSER = 'expo'
-EXPOADMINUSER = 'expoadmin'
-EXPOUSER_EMAIL = 'wookey@wookware.org'
-EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
-import secret_credentials.py
+
REPOS_ROOT_PATH = '/home/expo/'
sys.path.append(REPOS_ROOT_PATH)
diff --git a/localsettings.py b/localsettings.py
index d997789..0fdbde7 100644
--- a/localsettings.py
+++ b/localsettings.py
@@ -20,15 +20,25 @@ Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
print(" * importing troggle/localsettings.py")
+
+EXPOUSER = 'expo'
+EXPOADMINUSER = 'expoadmin'
+EXPOUSER_EMAIL = 'wookey@wookware.org'
+EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
+from secret_credentials import *
+
+EMAIL_HOST = "smtp-auth.mythic-beasts.com"
+EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
+EMAIL_PORT = 587
+EMAIL_USE_TLS = True
+DEFAULT_FROM_EMAIL = "django-test@klebos.net"
# -----------------------------------------------------------------
# THINK before you push this to a repo
-# - have you checked that credentials.py is in .gitignore ?
+# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
-
-
SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
@@ -114,7 +124,7 @@ DBMARIADB = {
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
- "PASSWORD": "my-secret-password-schwatzmooskogel",
+ "PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
@@ -156,16 +166,7 @@ TEMPLATES = [
},
]
-EXPOUSER = "expo"
-EXPOUSER_EMAIL = "philip.sargent@gmail.com"
-EXPOADMINUSER = "expoadmin"
-EXPOADMINUSER_EMAIL = "philip.sargent@gmail.com"
-EMAIL_HOST = "smtp-auth.mythic-beasts.com"
-EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
-EMAIL_PORT = 587
-EMAIL_USE_TLS = True
-DEFAULT_FROM_EMAIL = "django-test@klebos.net"
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
diff --git a/settings.py b/settings.py
index 0c5da75..741f8b5 100644
--- a/settings.py
+++ b/settings.py
@@ -16,6 +16,7 @@ if 'runserver' in sys.argv:
print(">>>>running on dev local runserver<<<<")
DEVSERVER = True
else:
+ print(">>>>running on expo.survex.com<<<<")
DEVSERVER = False
EPOCH = date.fromisoformat('1970-01-01')