mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
menu change to go to latest blank wallet
This commit is contained in:
parent
3c7661836c
commit
e38d29f33d
@ -274,7 +274,6 @@ def walletedit(request, path=None):
|
|||||||
|
|
||||||
def get_next_empty():
|
def get_next_empty():
|
||||||
latest = Wallet.objects.filter(walletname__startswith="20").latest('walletname')
|
latest = Wallet.objects.filter(walletname__startswith="20").latest('walletname')
|
||||||
print(f"Latest {latest=}")
|
|
||||||
next = int(latest.walletname[5:]) + 1
|
next = int(latest.walletname[5:]) + 1
|
||||||
return f"{latest.walletname[:4]}:{next:02d}"
|
return f"{latest.walletname[:4]}:{next:02d}"
|
||||||
|
|
||||||
@ -293,7 +292,6 @@ def walletedit(request, path=None):
|
|||||||
return (oldwallet(request, path), None)
|
return (oldwallet(request, path), None)
|
||||||
except:
|
except:
|
||||||
# if nonumeric wpath name for example
|
# if nonumeric wpath name for example
|
||||||
raise
|
|
||||||
return (oldwallet(request, path), None)
|
return (oldwallet(request, path), None)
|
||||||
|
|
||||||
if not re.match("(19|20)\d\d[:#]\d\d\d?", wpath):
|
if not re.match("(19|20)\d\d[:#]\d\d\d?", wpath):
|
||||||
@ -443,7 +441,6 @@ def walletedit(request, path=None):
|
|||||||
redirect, wallet = preprocess_path(path)
|
redirect, wallet = preprocess_path(path)
|
||||||
if redirect:
|
if redirect:
|
||||||
return redirect
|
return redirect
|
||||||
print(f"{wallet=}")
|
|
||||||
next, nexty, prev, prevy, year = create_nav_links(wallet)
|
next, nexty, prev, prevy, year = create_nav_links(wallet)
|
||||||
|
|
||||||
wurl = f"/walletedit/{wallet}".replace("#", ":")
|
wurl = f"/walletedit/{wallet}".replace("#", ":")
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<a href="/survexfile/">Survex</a> |
|
<a href="/survexfile/">Survex</a> |
|
||||||
<a href="{% url "survexcaveslist" %}">All Survex</a> |
|
<a href="{% url "survexcaveslist" %}">All Survex</a> |
|
||||||
<a href="{% url "allscans" %}">Scans</a> |
|
<a href="{% url "allscans" %}">Scans</a> |
|
||||||
<a href="{% url "walletedit" '2022:01' %}">Upload Scans</a> |
|
<a href="{% url "walletedit" '0000:01' %}">Upload Scans</a> |
|
||||||
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
||||||
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
|
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
|
||||||
<a href="{% url "photoupload" %}">Upload Photos</a> |
|
<a href="{% url "photoupload" %}">Upload Photos</a> |
|
||||||
|
Loading…
Reference in New Issue
Block a user