summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/models.py7
-rw-r--r--core/views/other.py6
-rw-r--r--core/views/statistics.py2
3 files changed, 10 insertions, 5 deletions
diff --git a/core/models.py b/core/models.py
index 9fa7cec..8082d6e 100644
--- a/core/models.py
+++ b/core/models.py
@@ -25,10 +25,15 @@ import troggle.core.models_survex
"""This file declares TroggleModel which inherits from django.db.models.Model
All TroggleModel subclasses inherit persistence in the django relational database. This is known as
-the django Object Relkational Mapping (ORM).
+the django Object Relational Mapping (ORM).
There are more subclasses define in models_caves.py models_survex.py etc.
"""
+# This variable is a dictionary holding gloablly visible indexes and cache functions.
+# It is a Global Object, see https://python-patterns.guide/python/module-globals/
+# troggle.models.TROG
+TROG = {}
+
def get_process_memory():
usage=resource.getrusage(resource.RUSAGE_SELF)
return usage[2]/1024.0
diff --git a/core/views/other.py b/core/views/other.py
index 1985096..4f53ead 100644
--- a/core/views/other.py
+++ b/core/views/other.py
@@ -14,7 +14,7 @@ from troggle.core.models_caves import LogbookEntry, QM, Cave, PersonTrip
from .login import login_required_if_public
from troggle.core.forms import UploadFileForm
-print("** importing troggle/core/views.other.py")
+print("** importing troggle/core/views/other.py")
"""Utility functions and code to serve the control panel and individual user's
progress and task list (deprecated as we do not have individual user login).
@@ -140,7 +140,7 @@ def ajax_QM_number(request):
return HttpResponse(res)
-print(" - newFile() is next in troggle/core/views.other.py")
+#print(" - newFile() is next in troggle/core/views/other.py")
@login_required_if_public
def newFile(request, pslug = None):
@@ -194,4 +194,4 @@ def delFile(f):
lbe.delete()
os.remove(lbe.filename)
-print("** Finished importing troggle/core/views.other.py") \ No newline at end of file
+print("** Finished importing troggle/core/views/other.py") \ No newline at end of file
diff --git a/core/views/statistics.py b/core/views/statistics.py
index 9d5cd16..1f11bed 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -61,7 +61,7 @@ def pathsreport(request):
pathstype = {
# "BOGUS" : type(settings.BOGUS),
"JSLIB_URL" : type(settings.JSLIB_URL),
- "JSLIB_ROOT" : str( settings.JSLIB_ROOT),
+ "JSLIB_ROOT" : type( settings.JSLIB_ROOT),
# "CSSLIB_URL" : type(settings.CSSLIB_URL),
"CAVEDESCRIPTIONS" : type(settings.CAVEDESCRIPTIONS),
"DIR_ROOT" : type(settings.DIR_ROOT),