forked from expo/troggle
tiny tidyings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
print("** Finished importing troggle/core/views/other.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),
|
||||
|
||||
Reference in New Issue
Block a user