diff options
Diffstat (limited to 'core/forms.py')
-rw-r--r-- | core/forms.py | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/core/forms.py b/core/forms.py index d3941b0..c7eb551 100644 --- a/core/forms.py +++ b/core/forms.py @@ -8,7 +8,7 @@ from django.contrib.admin.widgets import AdminDateWidget #from tinymce.widgets import TinyMCE -from troggle.core.models import Person, PersonExpedition, Expedition +from troggle.core.models.troggle import Person, PersonExpedition, Expedition from troggle.core.models_caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance class CaveForm(ModelForm): @@ -76,46 +76,6 @@ class EntranceLetterForm(ModelForm): model = CaveAndEntrance exclude = ('cave', 'entrance') -#This was all commneted out by Martin Green in 2012 ! -#class PersonForm(ModelForm): -# class Meta: -# model = Person - -#class LogbookEntryForm(ModelForm): -# class Meta: -# 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>') -# for QM in LogbookEntry.instance.QMs_found.all(): -# res.append(QM.wiki_link()) - -# res.append(r'</p><p style="float: left;"><b>QMs ticked off:</b>') -# for QM in LogbookEntry.instance.QMs_ticked_off.all(): -# res.append(QM.wiki_link()) - -# res.append(r'</p><p style="float: left; "><b>People</b>') -# for persontrip in LogbookEntry.instance.persontrip_set.all(): -# res.append(persontrip.wiki_link()) -# res.append(r'</p>') - -# return string.join(res, r'<br />') - -# def __init__(self, *args, **kwargs): -# super(LogbookEntryForm, self).__init__(*args, **kwargs) -# self.fields['text'].help_text=self.wikiLinkHints()# - -#class CaveForm(forms.Form): -# html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30})) def getTripForm(expedition): |