summaryrefslogtreecommitdiffstats
path: root/core/views/logbooks.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-10-01 16:10:17 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-10-01 16:10:17 +0300
commitd8aad0ba2b91a61308e50375376dd1594b2dffa7 (patch)
tree6fa76a112d59232802c34bb785b456390c18c374 /core/views/logbooks.py
parent7b8703dadc654284daea4ec1cb263a3b17b1b041 (diff)
downloadtroggle-d8aad0ba2b91a61308e50375376dd1594b2dffa7.tar.gz
troggle-d8aad0ba2b91a61308e50375376dd1594b2dffa7.tar.bz2
troggle-d8aad0ba2b91a61308e50375376dd1594b2dffa7.zip
All working except floklist script
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r--core/views/logbooks.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py
index 10a9bee..70fd89a 100644
--- a/core/views/logbooks.py
+++ b/core/views/logbooks.py
@@ -184,11 +184,14 @@ def better_person(request, name=""):
def person(
request,
- first_name="",
- last_name="",
+ slug=""
):
- """Original code as it has been for years. Trying to replace with better_person()
+ """Original code as it has been for years. Trying to replace with better_person
"""
+
+ this_person = Person.objects.get(slug=slug)
+ return render(request, "person.html", {"person": this_person})
+
try:
this_person = Person.objects.get(first_name=first_name, last_name=last_name)
except: