summaryrefslogtreecommitdiffstats
path: root/expo/forms.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-06-10 00:05:02 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-06-10 00:05:02 +0100
commitf9175cc6fad11770278d798863c9ade3b325d305 (patch)
treefd071966cd3781138dfe740f9a65f91d29d750e9 /expo/forms.py
parent91b8ba1be31bc96829676567341d5f342301dd29 (diff)
downloadtroggle-f9175cc6fad11770278d798863c9ade3b325d305.tar.gz
troggle-f9175cc6fad11770278d798863c9ade3b325d305.tar.bz2
troggle-f9175cc6fad11770278d798863c9ade3b325d305.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.py15
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