changeset 1219:0f0c36992f3c

pages (blog/view, forums/view): fixed encoding of request.args following Python3 port
author Goffi <goffi@goffi.org>
date Fri, 16 Aug 2019 17:14:46 +0200
parents c9fc839d304c
children afb40966cd0a
files libervia/pages/blog/view/page_meta.py libervia/pages/forums/view/page_meta.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/pages/blog/view/page_meta.py	Fri Aug 16 17:13:42 2019 +0200
+++ b/libervia/pages/blog/view/page_meta.py	Fri Aug 16 17:14:46 2019 +0200
@@ -238,7 +238,7 @@
                 """ % cgi.escape(bg_img, True))
 
     template_data['items'] = data['items'] = items
-    if request.args.get('reverse') == ['1']:
+    if request.args.get(b'reverse') == ['1']:
         template_data['items'].items.reverse()
     template_data['items_http_uri'] = items_http_uri = {}
     template_data['tags_http_uri'] = tags_http_uri = {}
--- a/libervia/pages/forums/view/page_meta.py	Fri Aug 16 17:13:42 2019 +0200
+++ b/libervia/pages/forums/view/page_meta.py	Fri Aug 16 17:14:46 2019 +0200
@@ -22,8 +22,8 @@
     data = self.getRData(request)
     data["show_comments"] = False
     blog_page = self.getPageByName("blog_view")
-    request.args["before"] = [""]
-    request.args["reverse"] = ["1"]
+    request.args[b"before"] = [b""]
+    request.args[b"reverse"] = [b"1"]
     yield blog_page.prepare_render(self, request)
     request.template_data["login_url"] = self.getPageRedirectURL(request)