From 85ada3697341c95f1f07890ac1cca4190d6d4d2b Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 10 Jun 2009 00:05:02 +0100 Subject: [svn] * Added admin inlines for QMs in LogbookEntry model * Added QM list edit view * Fixed "recent changes" box on front page --- expo/forms.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'expo/forms.py') diff --git a/expo/forms.py b/expo/forms.py index 2225b0c..9573c18 100644 --- a/expo/forms.py +++ b/expo/forms.py @@ -1,5 +1,5 @@ from django.forms import ModelForm -from models import Cave, Person, LogbookEntry +from models import Cave, Person, LogbookEntry, QM import django.forms as forms from django.forms.formsets import formset_factory from django.contrib.admin.widgets import AdminDateWidget @@ -37,4 +37,15 @@ class LogbookEntryForm(ModelForm): def __init__(self, *args, **kwargs): super(LogbookEntryForm, self).__init__(*args, **kwargs) - self.fields['text'].help_text=self.wikiLinkHints() \ No newline at end of file + self.fields['text'].help_text=self.wikiLinkHints() + +class QMsFoundInlineForm(ModelForm): + class Meta: + model = QM + exclude = 'ticked_off_by' + + def __init__(self, *args, **kwargs): + super(QMsFoundInlineForm, self).__init__(*args, **kwargs) + #self.fields['number'].initial=nextQMinyear()#work on that one + + \ No newline at end of file -- cgit v1.2.3