diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-01-31 20:52:22 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-01-31 20:52:22 +0000 |
commit | e38d29f33d8924679c7d393fbebbcc927d751b1f (patch) | |
tree | 456c3f25cd61faaecca0b00fb94d2849a8870c9f | |
parent | 3c7661836c5c34edf1548e4470c28765d3eec71c (diff) | |
download | troggle-e38d29f33d8924679c7d393fbebbcc927d751b1f.tar.gz troggle-e38d29f33d8924679c7d393fbebbcc927d751b1f.tar.bz2 troggle-e38d29f33d8924679c7d393fbebbcc927d751b1f.zip |
menu change to go to latest blank wallet
-rw-r--r-- | core/views/wallets.py | 3 | ||||
-rw-r--r-- | templates/base.html | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/core/views/wallets.py b/core/views/wallets.py index 5484e0a..738c2cb 100644 --- a/core/views/wallets.py +++ b/core/views/wallets.py @@ -274,7 +274,6 @@ def walletedit(request, path=None): def get_next_empty(): latest = Wallet.objects.filter(walletname__startswith="20").latest('walletname') - print(f"Latest {latest=}") next = int(latest.walletname[5:]) + 1 return f"{latest.walletname[:4]}:{next:02d}" @@ -293,7 +292,6 @@ def walletedit(request, path=None): return (oldwallet(request, path), None) except: # if nonumeric wpath name for example - raise return (oldwallet(request, path), None) 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) if redirect: return redirect - print(f"{wallet=}") next, nexty, prev, prevy, year = create_nav_links(wallet) wurl = f"/walletedit/{wallet}".replace("#", ":") diff --git a/templates/base.html b/templates/base.html index 4c07b0b..377fa24 100644 --- a/templates/base.html +++ b/templates/base.html @@ -32,7 +32,7 @@ <a href="/survexfile/">Survex</a> | <a href="{% url "survexcaveslist" %}">All Survex</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 "dwgupload" %}">Upload Drawings</a> | <a href="{% url "photoupload" %}">Upload Photos</a> | |