Commit 167d2255 authored by GuiΩ's avatar GuiΩ
Browse files

change pdf dir to static/out/

parent 1852d467
......@@ -407,7 +407,7 @@ class LatexModel(models.Model, VarReplacer):
output_folder='static/thumbs/',
output_file=baseName)
else:
shutil.move(pdffile, 'static/' + outfile)
shutil.move(pdffile, 'static/out/' + outfile)
except CalledProcessError as e:
compilok = False
log = e.output
......
......@@ -97,7 +97,7 @@ class FeuilleViewSet(ModelViewSet):
if not result['status']:
return HttpResponse(result['latexlog'].decode('utf-8').replace('\n', '<br>'))
else:
path = 'static/' + result['outfile']
path = 'static/out/' + result['outfile']
return FileResponse(open(path, 'rb'), as_attachment=True, content_type='application/pdf',
filename=result['outfile'])
......@@ -264,7 +264,7 @@ class SeanceViewSet(ModelViewSet):
if not result['status']:
return HttpResponse(result['latexlog'].decode('utf-8').replace('\n', '<br>'))
else:
path = 'static/' + result['outfile']
path = 'static/out/' + result['outfile']
return FileResponse(open(path, 'rb'), as_attachment=True, content_type='application/pdf',
filename=latexModel.get_file_name(seance=seance) + '.pdf')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment