From 4a3ccc728b1d8f0a48de98936858b7f16fc8abd2 Mon Sep 17 00:00:00 2001 From: Martin Green Date: Mon, 2 May 2011 02:15:54 +0100 Subject: Debugging, and make get_name function accessable (should really be renamed) --- core/forms.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/forms.py') diff --git a/core/forms.py b/core/forms.py index 9a54b7b..01a9cbe 100644 --- a/core/forms.py +++ b/core/forms.py @@ -70,11 +70,6 @@ def getTripForm(expedition): return self.cleaned_data class PersonTripForm(forms.Form): - def get_name(pe): - if pe.nickname: - return pe.nickname - else: - return pe.person.first_name names = [get_name(pe) for pe in PersonExpedition.objects.filter(expedition = expedition)] names.sort() names = ["-----"] + names @@ -86,3 +81,8 @@ def getTripForm(expedition): return PersonTripFormSet, TripForm +def get_name(pe): + if pe.nickname: + return pe.nickname + else: + return pe.person.first_name -- cgit v1.2.3