mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 03:17:12 +00:00
Render a cave editing page. Nb it does not do save anything yet.
This commit is contained in:
@@ -1,15 +1,41 @@
|
||||
from django.forms import ModelForm
|
||||
from models import Cave, Person, PersonExpedition, LogbookEntry, QM, Expedition
|
||||
from models import Cave, Person, PersonExpedition, LogbookEntry, QM, Expedition, Entrance, CaveAndEntrance
|
||||
import django.forms as forms
|
||||
from django.forms.formsets import formset_factory
|
||||
from django.forms.models import formset_factory
|
||||
from django.contrib.admin.widgets import AdminDateWidget
|
||||
import string
|
||||
from datetime import date
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
#class CaveForm(ModelForm):
|
||||
# class Meta:
|
||||
# model = Cave
|
||||
class CaveForm(ModelForm):
|
||||
underground_description = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30}))
|
||||
explorers = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
equipment = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
survey = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
kataster_status = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
underground_centre_line = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
notes = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
references = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
class Meta:
|
||||
model = Cave
|
||||
|
||||
|
||||
class EntranceForm(ModelForm):
|
||||
class Meta:
|
||||
model = Entrance
|
||||
|
||||
class CaveForm(ModelForm):
|
||||
underground_description = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30}))
|
||||
explorers = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
equipment = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
survey = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
kataster_status = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
underground_centre_line = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
notes = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
references = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
class Meta:
|
||||
model = Cave
|
||||
|
||||
#class PersonForm(ModelForm):
|
||||
# class Meta:
|
||||
@@ -48,8 +74,8 @@ from tinymce.widgets import TinyMCE
|
||||
# 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}))
|
||||
#class CaveForm(forms.Form):
|
||||
# html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30}))
|
||||
|
||||
def getTripForm(expedition):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user