changes in annotations again

master
ange 7 years ago
parent 822747f428
commit 1acf4cc157

@ -11,7 +11,7 @@
<input style="background-color: grey; color:white; font-family: archivo narrow; font-size: 18px; border: none;padding: 8px 24px;" type="submit" value="browse annotations"></input>
</form>
<br><br><br>
<a href="{{ url_for('myannotations_pdf') }}" style="color:#ff3300;">Get as PDF</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="annotations" style="color:#ff3300;"> All annotations</a><br><br>
<a href="annotations" style="color:#ff3300;"> All annotations</a><br><br>
<h1 class="header">Annotations/ Extracts with:&nbsp;&nbsp;<i>{{name}}</i></h1>

@ -123,15 +123,15 @@ def annotations_pdf():
html = render_template(('annotations.html'), annot=annot, light=light)
return render_pdf(HTML(string=html))
@app.route('/myannotations.pdf')
def myannotations_pdf():
books = db.session.query(Book).all()
name=str(request.args.get('query'))
annot = get_annotations()
res = get_annot_results(annot,name)
# Make a PDF straight from HTML in a string.
html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books)
return render_pdf(HTML(string=html))
# @app.route('/myannotations.pdf')
# def myannotations_pdf():
# books = db.session.query(Book).all()
# name=str(request.args.get('query'))
# annot = get_annotations()
# res = get_annot_results(annot,name)
# # Make a PDF straight from HTML in a string.
# html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books)
# return render_pdf(HTML(string=html))
@app.route('/viewpdf/<filename>')

Loading…
Cancel
Save