summaryrefslogtreecommitdiffstats
path: root/core/views/logbooks.py
diff options
context:
space:
mode:
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: