From 3957634c1fd24eb61efe0adc74fe7c6c7841ad86 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Tue, 24 Nov 2020 10:27:29 +0300 Subject: solve issues to do with decoding in python3 --- wqflask/wqflask/docs.py | 4 +++- wqflask/wqflask/views.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py index d653c269..23fc3cad 100644 --- a/wqflask/wqflask/docs.py +++ b/wqflask/wqflask/docs.py @@ -19,8 +19,10 @@ class Docs(object): self.title = self.entry.capitalize() self.content = "" else: + self.title = result[0] - self.content = result[1] + self.content = result[1].decode("utf-8") + self.editable = "false" # ZS: Removing option to edit to see if text still gets vandalized diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index b7c4d142..bf2e9026 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -304,8 +304,8 @@ def news(): @app.route("/references") def references(): doc = Docs("references", request.args) + # return render_template("reference.html") return render_template("docs.html", **doc.__dict__) - #return render_template("reference.html") @app.route("/intro") def intro(): -- cgit v1.2.3