changes in annotations again
This commit is contained in:
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> <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: <i>{{name}}</i></h1>
|
||||
|
||||
|
18
app/views.py
18
app/views.py
@ -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…
Reference in New Issue
Block a user