renamed to uploadfiles

This commit is contained in:
Philip Sargent 2021-05-04 20:56:44 +01:00
parent dc3379c186
commit b3fcd7765e
3 changed files with 15 additions and 5 deletions

View File

@ -32,6 +32,9 @@ todo = '''
so this is only a tool for a first pass, to be followed by extensive hand-editing!
When we have done all the old logbooks, delete this function and the two templates.
-Do GIT stuff for upload forms
-Move upload forms to proper file locations
'''
def todos(request, module):
@ -41,8 +44,10 @@ def todos(request, module):
from troggle.core.TESTS.tests import todo as tests
from troggle.core.views.logbooks import todo as viewlogbooks
from troggle.core.views.survex import todo as viewsurvex
from troggle.core.views.drawings import todo as viewdrawings
from troggle.parsers.caves import todo as parserscaves
from troggle.parsers.logbooks import todo as parserslogbooks
from troggle.parsers.drawings import todo as parsersdrawings
from troggle.parsers.survex import todo as parserssurvex
from troggle.core.models.caves import todo as modelcaves
from troggle.core.middleware import todo as middleware
@ -51,8 +56,10 @@ def todos(request, module):
'tests': tests,
'views/logbooks': viewlogbooks,
'views/survex': viewsurvex,
'views/drawings': viewdrawings,
'parsers/caves': parserscaves,
'parsers/logbooks': parserslogbooks,
'parsers/drawings': parsersdrawings,
'parsers/survex': parserssurvex,
'core/models/caves': modelcaves,
'core/middleware': middleware,
@ -195,7 +202,7 @@ def exportlogbook(request,year=None,extension=None):
class FilesForm(forms.Form): # not a model-form, just a form-form
scanfiles = forms.FileField()
uploadfiles = forms.FileField()
@login_required_if_public
def scanupload(request, wallet=None):
@ -312,6 +319,11 @@ def dwgupload(request, folder=None):
# print(f'! - FORM dwgupload multiple {actual_saved}')
filesaved = True
# DO GIT STUFF & load into Database too
# parsers.surveys.SetTunnelfileInfo(dwgfile) # commented out
# dwgfile.save()
files = []
dirs = []
#print(f'! - FORM dwgupload - start {folder} \n"{dirpath}" \n"{dirpath.parent}" \n"{dirpath.exists()}"')

View File

@ -11,8 +11,7 @@
{% csrf_token %}
<br>
<input class="fancybutton" type = "file" multiple="multiple"
placeholder = "Scanfiles" name = "scanfiles" id="scanfiles" />
name = "uploadfiles" id="uploadfiles" />
<br><br><br>
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
Upload

View File

@ -20,8 +20,7 @@
{% csrf_token %}
<br>
<input class="fancybutton" type = "file" multiple="multiple"
placeholder = "Scanfiles" name = "scanfiles" id="scanfiles" />
name = "uploadfiles" id="uploadfiles" />
<br><br><br>
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
Upload