drawing file upload form working

This commit is contained in:
Philip Sargent
2021-04-22 02:45:28 +01:00
parent 74403d28e9
commit 8f89b022c7
6 changed files with 103 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ from django.contrib.admin.widgets import AdminDateWidget
#from tinymce.widgets import TinyMCE
from troggle.core.models.troggle import Person, PersonExpedition, Expedition
from troggle.core.models.troggle import Person, PersonExpedition, Expedition, SimpleFileModel
from troggle.core.models.caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
'''These are all the Forms used by troggle
@@ -180,3 +180,14 @@ class UploadFileForm(forms.Form):
person = forms.ChoiceField([("-----", "Please select an expedition"), ], required=False)
class SimpleUploadFileForm(forms.ModelForm):
"""New in April 2021
"""
class Meta:
model = SimpleFileModel
fields = ('title', 'simplefile',)