summaryrefslogtreecommitdiffstats
path: root/core/views/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-01-30 23:04:11 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-01-30 23:04:11 +0000
commit3aca0d0c76364c8f9fa3fec43370f54f8270b43f (patch)
tree135ded90255f67bc00bb2c78a832f4328d05c6d9 /core/views/survex.py
parente35fccea5d52bd9f64820335a7bf1dbd38e6157e (diff)
downloadtroggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.tar.gz
troggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.tar.bz2
troggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.zip
ruf cleanup imports, bigly.
Diffstat (limited to 'core/views/survex.py')
-rw-r--r--core/views/survex.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index 14b904e..3575bc9 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -7,19 +7,13 @@ from pathlib import Path
from django import forms
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
-from django.http import Http404, HttpResponse, HttpResponseRedirect
+from django.http import HttpResponse
from django.shortcuts import render
-from django.template.context_processors import csrf
from django.views.decorators.csrf import ensure_csrf_cookie
-import parsers.survex
import troggle.settings as settings
from troggle.core.models.caves import Cave
-from troggle.core.models.logbooks import LogbookEntry # , PersonLogEntry
-from troggle.core.models.survex import SurvexBlock, SurvexDirectory, SurvexFile, SurvexPersonRole
-from troggle.core.models.troggle import Expedition, Person, PersonExpedition
-from troggle.core.utils import WriteAndCommitError, only_commit
-from troggle.parsers.people import GetPersonExpeditionNameLookup
+from troggle.core.utils import only_commit
"""Everything that views survexfiles
but also displays data on a cave or caves when there is ambiguity
@@ -165,8 +159,8 @@ class SvxForm(forms.Form):
)
# javascript seems to insert CRLF on WSL1 whatever you say. So fix that:
- res = fout.write(rcode.replace("\r", ""))
- res = fout.write("\n")
+ fout.write(rcode.replace("\r", ""))
+ fout.write("\n")
fout.close()
if socket.gethostname() == "expo":
@@ -323,7 +317,7 @@ def process(survex_file):
def threed(request, survex_file):
filepath3d = survexdatasetpath / str(survex_file + ".3d")
- filepathlog = survexdatasetpath / str(survex_file + ".log")
+ survexdatasetpath / str(survex_file + ".log")
if filepath3d.is_file():
threed = open(filepath3d, "rb")
return HttpResponse(threed, content_type="application/x-aven")
@@ -447,7 +441,7 @@ def survexcaveslist(request):
if os.path.isdir(gcavedir) and cavedir[0] != ".":
subdirs, subsvx = identifycavedircontents(gcavedir)
- caveid = check_cave_registered(
+ check_cave_registered(
area, cavedir
) # should do this only once per database load or it will be slow
survdirobj = []