diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:52:59 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:52:59 +0100 |
commit | 25b695e53dd09415f7849b35cd7bc63ca0b2439b (patch) | |
tree | f229dd9604ff082ce2a45eb5d4e6616366766b2f /expo/views_logbooks.py | |
parent | d25fd97864611c3be326412ae4aa84e8ad01cd66 (diff) | |
download | troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.tar.gz troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.tar.bz2 troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.zip |
[svn]
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8245 by aaron @ 2/17/2009 1:09 AM
Diffstat (limited to 'expo/views_logbooks.py')
-rw-r--r-- | expo/views_logbooks.py | 7 |
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, })
|