summaryrefslogtreecommitdiffstats
path: root/expo/views_logbooks.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 06:09:55 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 06:09:55 +0100
commit6137f8baaadccfa5019f36dfab1d43bbdb230629 (patch)
tree8ed279cefaa6a70f5f896a04f9008c51e28e98e8 /expo/views_logbooks.py
parentd6244e1ef3786be26931b1a3d772c6788a354d34 (diff)
downloadtroggle-6137f8baaadccfa5019f36dfab1d43bbdb230629.tar.gz
troggle-6137f8baaadccfa5019f36dfab1d43bbdb230629.tar.bz2
troggle-6137f8baaadccfa5019f36dfab1d43bbdb230629.zip
[svn] Logbook entries are now at /YYYY-MM-DD/slug .
Try editing a logbook entry title in the admin now. The django built in auto slug field is fun and javascripty. Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8308 by aaron @ 3/16/2009 7:27 PM
Diffstat (limited to 'expo/views_logbooks.py')
-rw-r--r--expo/views_logbooks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/expo/views_logbooks.py b/expo/views_logbooks.py
index 13468dc..894be2a 100644
--- a/expo/views_logbooks.py
+++ b/expo/views_logbooks.py
@@ -87,8 +87,8 @@ def newQMlink(logbookentry):
nextQMnumber=biggestQMnumber+1
return settings.URL_ROOT + r'/admin/expo/qm/add/?' + r'found_by=' + str(logbookentry.pk) +'&number=' + str(nextQMnumber)
-def logbookentry(request, logbookentry_pk):
- logbookentry = LogbookEntry.objects.get(pk = logbookentry_pk)
+def logbookentry(request, date, slug):
+ logbookentry = LogbookEntry.objects.get(date=date, slug=slug)
return render_response(request, 'logbookentry.html', {'logbookentry': logbookentry, 'newQMlink':newQMlink(logbookentry)})