diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 05:37:53 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 05:37:53 +0100 |
commit | 1d421b2d7c0cd478d5c92a54660bd3d085d05b12 (patch) | |
tree | 6bd086551825b79b77998960804c4a972cd03ed1 /expo/forms.py | |
parent | 4ce282b88ba27968cbfb5f0ec974332e6f9ea90d (diff) | |
download | troggle-1d421b2d7c0cd478d5c92a54660bd3d085d05b12.tar.gz troggle-1d421b2d7c0cd478d5c92a54660bd3d085d05b12.tar.bz2 troggle-1d421b2d7c0cd478d5c92a54660bd3d085d05b12.zip |
[svn] Fixed a bug with QMs with numbers between 1 and 10, and fixed the links in the recent changes box.
Diffstat (limited to 'expo/forms.py')
-rw-r--r-- | expo/forms.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/expo/forms.py b/expo/forms.py index 9573c18..929c4e9 100644 --- a/expo/forms.py +++ b/expo/forms.py @@ -4,6 +4,7 @@ import django.forms as forms from django.forms.formsets import formset_factory
from django.contrib.admin.widgets import AdminDateWidget
import string
+from datetime import date
class CaveForm(ModelForm):
class Meta:
@@ -18,6 +19,13 @@ class LogbookEntryForm(ModelForm): model = LogbookEntry
def wikiLinkHints(LogbookEntry=None):
+ """
+ This function returns html-formatted paragraphs for each of the
+ wikilink types that are related to this logbookentry. Each paragraph
+ contains a list of all of the related wikilinks.
+
+ Perhaps an admin javascript solution would be better.
+ """
res = ["Please use the following wikilinks, which are related to this logbook entry:"]
res.append(r'</p><p style="float: left;"><b>QMs found:</b>')
@@ -37,15 +45,4 @@ class LogbookEntryForm(ModelForm): def __init__(self, *args, **kwargs):
super(LogbookEntryForm, self).__init__(*args, **kwargs)
- 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 + self.fields['text'].help_text=self.wikiLinkHints()
\ No newline at end of file |