attempt to simplify wnt horribly wrong

This commit is contained in:
Philip Sargent
2020-06-06 22:51:55 +01:00
parent f8a3c8f5bc
commit fda50ed570
9 changed files with 135 additions and 88 deletions

View File

@@ -15,6 +15,7 @@ from troggle.core.models_survex import SurvexLeg
from troggle.helper import login_required_if_public
from troggle.core.forms import UploadFileForm
print("** importing troggle/core/views_other.py")
def showrequest(request):
return HttpResponse(request.GET)
@@ -57,11 +58,12 @@ def controlPanel(request):
jobs_completed=[]
if request.method=='POST':
if request.user.is_superuser:
# NONE of this works now that databaseReset has been so extensively rewritten
#importlist is mostly here so that things happen in the correct order.
#http post data seems to come in an unpredictable order, so we do it this way.
importlist=['reinit_db', 'import_people', 'import_caves', 'import_logbooks',
'import_survexblks', 'import_QMs', 'import_survexpos', 'import_surveyscans', 'import_tunnelfiles']
'import_survexblks', 'import_QMs', 'import_surveyscans', 'import_tunnelfiles']
databaseReset.dirsredirect()
for item in importlist:
if item in request.POST: