2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 11:27:10 +00:00

create core/models/ directroy

This commit is contained in:
Philip Sargent
2021-04-13 00:43:57 +01:00
parent 304bbd230a
commit 5b3b0e67e9
19 changed files with 25 additions and 84 deletions

View File

@@ -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):