diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 00:05:02 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 00:05:02 +0100 |
commit | 85ada3697341c95f1f07890ac1cca4190d6d4d2b (patch) | |
tree | c8d6037d700b67d5bbe3e9fb55cc2bac09e24ebc /expo/forms.py | |
parent | a3e42d3b199a4440c5fddbd7e3319fb4474c14c4 (diff) | |
download | troggle-85ada3697341c95f1f07890ac1cca4190d6d4d2b.tar.gz troggle-85ada3697341c95f1f07890ac1cca4190d6d4d2b.tar.bz2 troggle-85ada3697341c95f1f07890ac1cca4190d6d4d2b.zip |
[svn] * Added admin inlines for QMs in LogbookEntry model
* Added QM list edit view
* Fixed "recent changes" box on front page
Diffstat (limited to 'expo/forms.py')
-rw-r--r-- | expo/forms.py | 15 |
1 files changed, 13 insertions, 2 deletions
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 |