diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-12 05:39:30 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-12 05:39:30 +0100 |
commit | 5db52862f6d2ebcc3c3878f2442f68e3d4372d72 (patch) | |
tree | 34ae0cf6242f101e4cbfe06d66b2a18b7fa4f657 /expo/views_logbooks.py | |
parent | 0ed153f2d0fd38dfe94a686621a0e70922233920 (diff) | |
download | troggle-5db52862f6d2ebcc3c3878f2442f68e3d4372d72.tar.gz troggle-5db52862f6d2ebcc3c3878f2442f68e3d4372d72.tar.bz2 troggle-5db52862f6d2ebcc3c3878f2442f68e3d4372d72.zip |
[svn] * Fix bugs that were causing broken wikilinks. *Add edit link to mugshots. *make admin url trailing-slash tolerant
Diffstat (limited to 'expo/views_logbooks.py')
-rw-r--r-- | expo/views_logbooks.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/expo/views_logbooks.py b/expo/views_logbooks.py index cfebd35..afcdafc 100644 --- a/expo/views_logbooks.py +++ b/expo/views_logbooks.py @@ -98,9 +98,13 @@ def newQMlink(logbookentry): return settings.URL_ROOT + r'/admin/expo/qm/add/?' + r'found_by=' + str(logbookentry.pk) +'&number=' + str(nextQMnumber)
def logbookentry(request, date, slug):
- logbookentry = LogbookEntry.objects.get(date=date, slug=slug)
-
- return render_response(request, 'logbookentry.html', {'logbookentry': logbookentry, 'newQMlink':newQMlink(logbookentry)})
+ logbookentry = LogbookEntry.objects.filter(date=date, slug=slug)
+
+ if len(logbookentry)>1:
+ return render_response(request, 'object_list.html',{'object_list':logbookentry})
+ else:
+ logbookentry=logbookentry[0]
+ return render_response(request, 'logbookentry.html', {'logbookentry': logbookentry, 'newQMlink':newQMlink(logbookentry)})
def logbookSearch(request, extra):
query_string = ''
|