mass refactor
This commit is contained in:
parent
c16b4caaa1
commit
ffafa87cb8
@ -1,4 +1,5 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from . import importer
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def fitnotes_upload(request):
|
def fitnotes_upload(request):
|
||||||
@ -10,7 +11,7 @@ def fitnotes_upload(request):
|
|||||||
for chunk in request.FILES['file'].chunks():
|
for chunk in request.FILES['file'].chunks():
|
||||||
tmp.write(chunk)
|
tmp.write(chunk)
|
||||||
try:
|
try:
|
||||||
importers.import_fitnotes_db(fname, request.user)
|
importer.import_fitnotes_db(fname, request.user)
|
||||||
finally:
|
finally:
|
||||||
os.remove(fname)
|
os.remove(fname)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user