changeset 949:36e9747520fd

pages (common/blog): use request data to indicate if comments are allowed
author Goffi <goffi@goffi.org>
date Tue, 23 May 2017 00:06:03 +0200
parents c20ac29d869f
children 67a59552f3e3
files src/pages/common/blog/page_meta.py src/pages/g/e/page_meta.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/pages/common/blog/page_meta.py	Tue May 23 00:06:03 2017 +0200
+++ b/src/pages/common/blog/page_meta.py	Tue May 23 00:06:03 2017 +0200
@@ -109,7 +109,7 @@
         yield appendComments(self, items, identities, profile)
 
     template_data[u'items'] = items
-    template_data[u'allow_commenting'] = u'simple'
+    template_data[u'allow_commenting'] = data.get(u'allow_commenting', False)
 
 
 @defer.inlineCallbacks
--- a/src/pages/g/e/page_meta.py	Tue May 23 00:06:03 2017 +0200
+++ b/src/pages/g/e/page_meta.py	Tue May 23 00:06:03 2017 +0200
@@ -57,6 +57,7 @@
 
     data[u'service'] = jid.JID(event_data[u'blog_service'])
     data[u'node'] = event_data[u'blog_node']
+    data[u'allow_commenting'] = u'simple'
 
     # we now need blog items, using blog common page
     # this will fill the "items" template data