summaryrefslogtreecommitdiffstats
path: root/expo/views_logbooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'expo/views_logbooks.py')
-rw-r--r--expo/views_logbooks.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/expo/views_logbooks.py b/expo/views_logbooks.py
index edf2f30..38aeac6 100644
--- a/expo/views_logbooks.py
+++ b/expo/views_logbooks.py
@@ -1,7 +1,7 @@
from django.shortcuts import render_to_response
from troggle.expo.models import Expedition, Person, PersonExpedition, PersonTrip, LogbookEntry
import troggle.settings as settings
-
+from django.db import models
from troggle.parsers.logbooks import LoadLogbookForExpedition
from troggle.parsers.people import GetPersonExpeditionNameLookup
from troggle.expo.forms import PersonForm
@@ -12,6 +12,8 @@ from troggle.alwaysUseRequestContext import render_response
import search
import re
+@models.permalink #this allows the nice get_absolute_url syntax we are using
+
def personindex(request):
persons = Person.objects.all()
# From what I can tell, "persons" seems to be the table rows, while "personss" is the table columns. - AC 16 Feb 09
@@ -36,6 +38,9 @@ def expedition(request, expeditionname):
logbookentries = expedition.logbookentry_set.order_by('date')
return render_response(request,'expedition.html', {'expedition': expedition, 'expedition_next':expedition_next, 'expedition_prev':expedition_prev, 'logbookentries':logbookentries, 'message':message, })
+ def get_absolute_url(self):
+ return ('expedition', (expedition.year))
+
def person(request, first_name='', last_name=''):
person = Person.objects.get(first_name = first_name, last_name = last_name)
return render_response(request,'person.html', {'person': person, })