From 0094cf7054c839d5ff62e970c85e2de3f4c6334d Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 28 Jul 2020 01:22:06 +0100 Subject: [PATCH] clean troggle menu and drawingfiles layout --- .gitignore | 1 + core/view_surveys.py | 3 ++- core/views_caves.py | 5 ++--- templates/base.html | 16 +++++++--------- templates/manyscansfolders.html | 8 ++++---- templates/tunnelfiles.html | 18 ++++++++---------- urls.py | 6 ++++-- 7 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index e45416c..6a8826e 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ _1623.3d _1623.pos _1623.err diffsettings.txt +_16230.svx diff --git a/core/view_surveys.py b/core/view_surveys.py index c1fec57..dae6f31 100644 --- a/core/view_surveys.py +++ b/core/view_surveys.py @@ -9,7 +9,8 @@ from django.http import HttpResponse, Http404 from troggle.core.models_survex import ScansFolder, SingleScan, SurvexBlock, TunnelFile from troggle.flatpages import views as flatviews import parsers.surveys -#from . import fileAbstraction + + def fa_readFile(*path): try: diff --git a/core/views_caves.py b/core/views_caves.py index c4d06a1..5820857 100644 --- a/core/views_caves.py +++ b/core/views_caves.py @@ -74,7 +74,7 @@ def numericalcmp(x, y): return cmp(padnumber(x), padnumber(y)) def caveKey(x): - """python3 function for sort. + """python3 function for sort. Done in a hurry. Note that cave kataster numbers are not generally integers. This needs to be fixed make a decent sort order. """ @@ -89,7 +89,7 @@ def getnotablecaves(): cave = Cave.objects.get(kataster_number=kataster_number) notablecaves.append(cave) except: - print(" ! FAILED to get only one cave per kataster_number for: "+kataster_number) + print(" ! FAILED to get only one cave per kataster_number OR invalid number for: "+kataster_number) caves = Cave.objects.all().filter(kataster_number=kataster_number) for c in caves: print(c.kataster_number, c.slug()) @@ -102,7 +102,6 @@ def caveindex(request): caves = Cave.objects.all() caves1623 = list(Cave.objects.filter(area__short_name = "1623")) caves1626 = list(Cave.objects.filter(area__short_name = "1626")) - #python2 to python3 issue https://realpython.com/python-sort/ caves1623.sort(key=caveKey) caves1626.sort(key=caveKey) return render(request,'caveindex.html', {'caves1623': caves1623, 'caves1626': caves1626, 'notablecaves':getnotablecaves(), 'cavepage': True}) diff --git a/templates/base.html b/templates/base.html index c38710d..282ec3e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -34,16 +34,14 @@ All Survex | Scans | Drawing files | - 290 | - 291 | - 359 | - 258 | - 264 | - Surveys-264 | + 290 (FGH) | + 291 (GSH) | + 359 (Homecoming) | + Surveys-204 | Expo2018 | Expo2019 | - Django admin +
@@ -56,8 +54,8 @@ people | all expeditions | statistics | - import/export data - + import/export data + Django admin