From e5f0990f97b8316ea618f0831b6858dde92afaed Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 27 May 2020 07:36:27 -0500 Subject: Wiring up blog entries --- bh20simplewebuploader/main.py | 9 +++++++-- bh20simplewebuploader/templates/blog.html | 14 +++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'bh20simplewebuploader') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index f7e45fb..4f14d10 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -441,9 +441,14 @@ def download_page(): def demo_page(): return render_template('demo.html',menu='DEMO') -@app.route('/blog') +@app.route('/blog',methods=['GET']) def blog_page(): - return render_template('blog.html',menu='BLOG') + blog_content = request.args.get('id') # e.g. using-covid-19-pubseq-part3 + buf = None; + if blog_content: + buf = get_html_body('doc/blog/'+blog_content+'.html') + return render_template('blog.html',menu='BLOG',embed=buf) + @app.route('/about') def about_page(): diff --git a/bh20simplewebuploader/templates/blog.html b/bh20simplewebuploader/templates/blog.html index 835e019..3069dd3 100644 --- a/bh20simplewebuploader/templates/blog.html +++ b/bh20simplewebuploader/templates/blog.html @@ -5,9 +5,17 @@ {% include 'banner.html' %} {% include 'menu.html' %} -
+ Other blog entries: +
+ + {% else %} +