geo
Alice 7 years ago
parent 9c84e75e8c
commit a108579de4

@ -678,17 +678,17 @@ def import_csv():
cover = '' cover = ''
if row['file'] == '': if row['file'] == '':
file = 'potential.pdf' file = 'potential.pdf'
# file_extension = '.pdf' file_extension = '.pdf'
# ptitle = row['title'] ptitle = row['title']
# pbook = Potential(ptitle) pbook = Potential(ptitle)
# db.session.add(pbook) db.session.add(pbook)
# db.session.commit() db.session.commit()
# pbooks = Potential.query.all() pbooks = Potential.query.all()
# template = 'app/templates/potential_pdf.html' template = 'app/templates/potential_pdf.html'
# html_string = render_template('potential_pdf.html', pbooks = pbooks) html_string = render_template('potential_pdf.html', pbooks = pbooks)
# html = HTML(string=html_string) html = HTML(string=html_string)
# html.write_pdf(target='app/uploads/potential.pdf') html.write_pdf(target='app/uploads/potential.pdf')
# print ('writing to potential_pdf') print ('writing to potential_pdf')
else: else:
fullpath = os.path.join(app.config['UPLOAD_FOLDER'], row['file']) fullpath = os.path.join(app.config['UPLOAD_FOLDER'], row['file'])

Loading…
Cancel
Save