rename surveyscansfolder(s) to scanwallet(s)

This commit is contained in:
Philip Sargent 2021-04-26 17:46:23 +01:00
parent b8803c8e5b
commit f0d291f527
5 changed files with 8 additions and 8 deletions

View File

@ -180,7 +180,7 @@ class ScansFolder(models.Model):
ordering = ('walletname',)
def get_absolute_url(self):
return urljoin(settings.URL_ROOT, reverse('surveyscansfolder', kwargs={"path":re.sub("#", "%23", self.walletname)}))
return urljoin(settings.URL_ROOT, reverse('scanswallet', kwargs={"path":re.sub("#", "%23", self.walletname)}))
def __str__(self):
return str(self.walletname) + " (Survey Scans Folder)"

View File

@ -20,7 +20,7 @@ need to check if inavlid query string is invalid, or produces multiple replies
and render a user-friendly error page.
'''
def surveyscansfolder(request, path):
def scanswallet(request, path):
#print [ s.walletname for s in ScansFolder.objects.all() ]
try:
scansfolder = ScansFolder.objects.get(walletname=urlunquote(path))
@ -42,7 +42,7 @@ def scansingle(request, path, file):
return render(request, 'errors/generic.html', {'message': message})
def surveyscansfolders(request):
def scanswallets(request):
manyscansfolders = ScansFolder.objects.all()
return render(request, 'manyscansfolders.html', { 'manyscansfolders':manyscansfolders, 'settings': settings })

View File

@ -31,7 +31,7 @@
<a href="{% url "survexcavessingle" "204" %}">Survex-204</a> |
<a href="/survexfile/">Survex</a> |
<a href="{% url "survexcaveslist" %}">All Survex</a> |
<a href="{% url "surveyscansfolders" %}">Scans</a> |
<a href="{% url "scanswallets" %}">Scans</a> |
<a href="{% url "dwgdata" %}">Drawings</a> |
<a href="/1623/290/290.html">290 (FGH)</a> |
<a href="/1623/291/291">291 (GSH)</a> |

View File

@ -17,7 +17,7 @@
{% if cavepage %}
<ul>
<li><a href="{% url "survexcaveslist" %}">All Survex</a></li>
<li><a href="{% url "surveyscansfolders" %}">Scans</a></li>
<li><a href="{% url "scanswallets" %}">Scans</a></li>
<li><a href="{% url "dwgdata" %}">Drawings</a></li>
<li><a href="{% url "survexcavessingle" "caves-1623/290/290.svx" %}">290</a></li>
<li><a href="{% url "survexcavessingle" "caves-1623/291/291.svx" %}">291</a></li>

View File

@ -9,7 +9,7 @@ from django.contrib import auth
from django.urls import reverse, resolve
from troggle.core.views import caves, statistics, survex
from troggle.core.views.surveys import scansingle, surveyscansfolder, surveyscansfolders, dwgdata, dwgfilesingle, dwgfileupload
from troggle.core.views.surveys import scansingle, scanswallet, scanswallets, dwgdata, dwgfilesingle, dwgfileupload
from troggle.core.views.other import troggle404, frontpage, todos, controlpanel, frontpage, scanupload
from troggle.core.views.other import downloadlogbook, ajax_QM_number, downloadQMs
from troggle.core.views.caves import ent, cavepage
@ -141,8 +141,8 @@ trogglepatterns = [
re_path(r'^survexfile/caves$', survex.survexcaveslist, name="survexcaveslist"), # auto slash not working
re_path(r'^survexfile/(?P<survex_cave>.*)$', survex.survexcavesingle, name="survexcavessingle"),
re_path(r'^survey_scans/$', surveyscansfolders, name="surveyscansfolders"),
re_path(r'^survey_scans/(?P<path>[^/]+)/$', surveyscansfolder, name="surveyscansfolder"),
re_path(r'^survey_scans/$', scanswallets, name="scanswallets"),
re_path(r'^survey_scans/(?P<path>[^/]+)/$', scanswallet, name="scanswallet"),
re_path(r'^survey_scans/(?P<path>[^/]+)/(?P<file>[^/]+)$',
scansingle, name="scansingle"),