2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

updated packages and settings

This commit is contained in:
Philip Sargent 2022-06-25 20:01:43 +03:00
parent 859ae9d825
commit 451326789b
4 changed files with 48 additions and 26 deletions

View File

@ -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)

View File

@ -1,2 +1,6 @@
/mnt/d/EXPO/troggle/core/views/uploads.py:120: DeprecationWarning: invalid escape sequence \d
if not re.match('(19|20)\d\d[:#]\d\d', wallet):
/home/philip/p10d3/lib/python3.10/site-packages/django/utils/version.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
/home/philip/p10d3/lib/python3.10/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
event_loop = asyncio.get_event_loop()
/home/philip/p10d3/lib/python3.10/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
event_loop = asyncio.get_event_loop()

View File

@ -1,13 +1,13 @@
asgiref==3.3.4
asgiref==3.5.0
confusable-homoglyphs==3.2.0
coverage==5.5
coverage==6.4
Django==3.2
docutils==0.14
docutils==0.18
gunicorn==20.1.0
mariadb==1.0.11
Pillow==9.0.1
pytz==2019.1
reportlab==3.6.8
sqlparse==0.2.4
typing-extensions==3.7.4.3
Unidecode==1.0.23
Pillow==9.1.0
pytz==2022.1
reportlab==3.6.0
sqlparse==0.4.0
typing_extensions==4.2.0
Unidecode==1.3.0

View File

@ -1,13 +1,13 @@
asgiref==3.5
asgiref==3.5.0
confusable-homoglyphs==3.2.0
coverage==6.4
Django==3.2
docutils==0.18
gunicorn==20.1.0
Pillow==9.1
pytz==2022.1
reportlab==3.6
sqlparse==0.4
typing-extensions==4.2
Unidecode==1.3
mariadb==1.0.11
Pillow==9.1.0
pytz==2022.1
reportlab==3.6.0
sqlparse==0.4.0
typing_extensions==4.2.0
Unidecode==1.3.0