[svn] made index of people

Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8224 by julian @ 1/24/2009 6:26 PM
This commit is contained in:
substantialnoninfringinguser
2009-05-13 05:44:35 +01:00
parent 1e1453f443
commit 264594ed05
10 changed files with 61 additions and 53 deletions

View File

@@ -10,7 +10,13 @@ import re
def personindex(request):
persons = Person.objects.all()
return render_to_response('personindex.html', {'persons': persons, 'settings': settings})
personss = [ ]
ncols = 5
nc = (len(persons) + ncols - 1) / ncols
for i in range(ncols):
personss.append(persons[i * nc: (i + 1) * nc])
return render_to_response('personindex.html', {'persons': persons, 'personss':personss, 'settings': settings})
def expedition(request, expeditionname):
year = int(expeditionname)