[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
This commit is contained in:
substantialnoninfringinguser
2009-05-13 06:09:55 +01:00
parent d6244e1ef3
commit 6137f8baaa
6 changed files with 15 additions and 5 deletions

View File

@@ -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)})