mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 14:51:51 +00:00
update deprecations etc
This commit is contained in:
parent
9c39c9dcff
commit
a71c616afd
@ -47,7 +47,7 @@ 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' # should be finding this automatically: python --version etc.
|
||||
#LIBDIR = REPOS_ROOT_PATH / 'lib' / 'python3.9'
|
||||
|
||||
TROGGLE_PATH = Path(__file__).parent
|
||||
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
|
||||
@ -55,7 +55,8 @@ MEDIA_ROOT = TROGGLE_PATH / 'media'
|
||||
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
|
||||
|
||||
#FILES = Path('/mnt/d/expofiles/')
|
||||
EXPOFILES = Path('/mnt/d/EXPO/expofiles/')
|
||||
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
|
||||
|
||||
SCANS_ROOT = EXPOFILES / 'surveyscans'
|
||||
PHOTOS_ROOT = EXPOFILES / 'photos'
|
||||
PHOTOS_YEAR = "2022"
|
||||
@ -64,19 +65,18 @@ PHOTOS_YEAR = "2022"
|
||||
# trailing slash if there is a path component (optional in other cases).
|
||||
MEDIA_URL = '/site-media/'
|
||||
|
||||
DIR_ROOT = ''#this should end in / if a value is given
|
||||
DIR_ROOT = Path('') #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/')
|
||||
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/')
|
||||
# and they all need to end with / so using 'Path' doesn't work..
|
||||
MEDIA_URL = Path(URL_ROOT , '/site_media/')
|
||||
PHOTOS_URL = Path(URL_ROOT , '/photos/')
|
||||
|
||||
|
||||
STATIC_URL = urllib.parse.urljoin(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
|
||||
JSLIB_URL = urllib.parse.urljoin(URL_ROOT , '/javascript/') # used for CaveViewer JS utility
|
||||
STATIC_URL = Path(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
|
||||
JSLIB_URL = Path(URL_ROOT , '/javascript/') # used for CaveViewer JS utility
|
||||
|
||||
#STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
|
||||
# --------------------- MEDIA redirections END ---------------------
|
||||
@ -92,7 +92,7 @@ SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
|
||||
DBSQLITE = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||
'NAME' : 'troggle.sqlite',
|
||||
'NAME' : '/home/philip/p11d5/troggle.sqlite',
|
||||
# 'NAME' : ':memory:',
|
||||
'USER' : 'expo', # Not used with sqlite3.
|
||||
'PASSWORD' : 'sekrit', # Not used with sqlite3.
|
||||
@ -122,11 +122,9 @@ if DBSWITCH == "mariadb":
|
||||
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
|
||||
|
||||
PYTHON_PATH = REPOS_ROOT_PATH / 'troggle'
|
||||
sys.path.append(os.fspath(REPOS_ROOT_PATH))
|
||||
sys.path.append(os.fspath(PYTHON_PATH))
|
||||
|
||||
LOGFILE = PYTHON_PATH / 'troggle.log'
|
||||
PYTHON_PATH = os.fspath(PYTHON_PATH)
|
||||
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
@ -156,9 +154,6 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
|
||||
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
|
||||
|
||||
EXPOUSER = 'expo'
|
||||
EXPOUSER_EMAIL = 'philip.sargent@gmail.com'
|
||||
EXPOADMINUSER = 'expoadmin'
|
||||
@ -172,9 +167,8 @@ DEFAULT_FROM_EMAIL = 'django-test@klebos.net'
|
||||
|
||||
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
|
||||
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
|
||||
|
||||
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
|
||||
#SURVEYS = REPOS_ROOT_PATH
|
||||
|
||||
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
|
||||
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
|
||||
EXPOWEB_URL = ''
|
||||
@ -182,15 +176,21 @@ EXPOWEB_URL = ''
|
||||
|
||||
# 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 = os.fspath(CAVEDESCRIPTIONS)
|
||||
ENTRANCEDESCRIPTIONS = os.fspath(ENTRANCEDESCRIPTIONS)
|
||||
LOGFILE = os.fspath(LOGFILE)
|
||||
#SURVEYS = os.fspath(SURVEYS)
|
||||
EXPOWEB = os.fspath(EXPOWEB)
|
||||
DRAWINGS_DATA = os.fspath(DRAWINGS_DATA)
|
||||
SURVEX_DATA = os.fspath(SURVEX_DATA)
|
||||
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)
|
||||
SCANS_ROOT = os.fspath(SCANS_ROOT)
|
||||
# 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))
|
@ -1,4 +1,8 @@
|
||||
/home/philip/zp310d3/lib/python3.10/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
|
||||
/home/philip/p11d5/lib/python3.11/site-packages/django/http/request.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
|
||||
import cgi
|
||||
/home/philip/p11d5/lib/python3.11/site-packages/django/utils/encoding.py:266: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
|
||||
encoding = locale.getdefaultlocale()[1] or 'ascii'
|
||||
/home/philip/p11d5/lib/python3.11/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
|
||||
event_loop = asyncio.get_event_loop()
|
||||
/home/philip/zp310d3/lib/python3.10/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
|
||||
/home/philip/p11d5/lib/python3.11/site-packages/django/utils/asyncio.py:19: DeprecationWarning: There is no current event loop
|
||||
event_loop = asyncio.get_event_loop()
|
||||
|
@ -1,8 +1,16 @@
|
||||
asgiref==3.5.2
|
||||
coverage==6.5
|
||||
Django==3.2.16
|
||||
attrs==22.2.0
|
||||
click==8.1.3
|
||||
colorama==0.4.6
|
||||
coverage==6.5.0
|
||||
Django==3.2
|
||||
docutils==0.19
|
||||
interrogate==1.5.0
|
||||
Pillow==9.3.0
|
||||
py==1.11.0
|
||||
pytz==2022.6
|
||||
sqlparse==0.4.3
|
||||
tabulate==0.9.0
|
||||
toml==0.10.2
|
||||
typing_extensions==4.4.0
|
||||
Unidecode==1.3.6
|
||||
Pillow==9.3
|
||||
|
Loading…
Reference in New Issue
Block a user