mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 07:07:13 +00:00
ruf cleanup imports, bigly.
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user