changeset 1083:ff503f23ac37

pages: fixed calls to "blog" instead of "blog_view"
author Goffi <goffi@goffi.org>
date Fri, 30 Mar 2018 20:31:47 +0200
parents 8d8b88bfddad
children a24dd1d316f5
files src/pages/blog/atom.xml/page_meta.py src/pages/blog/page_meta.py src/pages/blog/view/atom.xml/page_meta.py src/pages/blog/view/page_meta.py src/pages/u/blog/page_meta.py src/pages/u/page_meta.py
diffstat 6 files changed, 40 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/src/pages/blog/atom.xml/page_meta.py	Tue Mar 27 08:40:27 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#!/usr/bin/env python2.7
-# -*- coding: utf-8 -*-
-
-from libervia.server.constants import Const as C
-from twisted.internet import defer
-from sat.tools.common import uri
-import time
-
-name = u"blog_feed_atom"
-access = C.PAGES_ACCESS_PUBLIC
-template = u"blog/atom.xml"
-
-
-@defer.inlineCallbacks
-def prepare_render(self, request):
-    request.setHeader('Content-Type', 'application/atom+xml; charset=utf-8')
-    data = self.getRData(request)
-    service, node = data[u'service'], data.get(u'node')
-    self.checkCache(request, C.CACHE_PUBSUB, service=service, node=node, short='microblog')
-    data['show_comments'] = False
-    template_data = request.template_data
-    blog_page = self.getPageByName(u'blog')
-    yield blog_page.prepare_render(self, request)
-    items = data[u'items']
-
-    template_data[u'request_uri'] = self.host.getExtBaseURL(request, request.path.decode('utf-8'))
-    template_data[u'xmpp_uri'] = uri.buildXMPPUri(u'pubsub',
-                                                 subtype=u'microblog',
-                                                 path=service.full(),
-                                                 node=node)
-    blog_view = self.getPageByName(u'blog_view')
-    template_data[u'http_uri'] = self.host.getExtBaseURL(request, blog_view.getURL(service.full(), node))
-    if items:
-        template_data[u'updated'] = items[0].updated
-    else:
-        template_data[u'updated'] = time.time()
--- a/src/pages/blog/page_meta.py	Tue Mar 27 08:40:27 2018 +0200
+++ b/src/pages/blog/page_meta.py	Fri Mar 30 20:31:47 2018 +0200
@@ -5,7 +5,7 @@
 from twisted.internet import defer
 from libervia.server import session_iface
 from sat.core.log import getLogger
-log = getLogger('pages/common/blog')
+log = getLogger('pages/blog')
 
 name = u'blog'
 access = C.PAGES_ACCESS_PUBLIC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pages/blog/view/atom.xml/page_meta.py	Fri Mar 30 20:31:47 2018 +0200
@@ -0,0 +1,36 @@
+#!/usr/bin/env python2.7
+# -*- coding: utf-8 -*-
+
+from libervia.server.constants import Const as C
+from twisted.internet import defer
+from sat.tools.common import uri
+import time
+
+name = u"blog_feed_atom"
+access = C.PAGES_ACCESS_PUBLIC
+template = u"blog/atom.xml"
+
+
+@defer.inlineCallbacks
+def prepare_render(self, request):
+    request.setHeader('Content-Type', 'application/atom+xml; charset=utf-8')
+    data = self.getRData(request)
+    service, node = data[u'service'], data.get(u'node')
+    self.checkCache(request, C.CACHE_PUBSUB, service=service, node=node, short='microblog')
+    data['show_comments'] = False
+    template_data = request.template_data
+    blog_page = self.getPageByName(u'blog_view')
+    yield blog_page.prepare_render(self, request)
+    items = data[u'items']
+
+    template_data[u'request_uri'] = self.host.getExtBaseURL(request, request.path.decode('utf-8'))
+    template_data[u'xmpp_uri'] = uri.buildXMPPUri(u'pubsub',
+                                                 subtype=u'microblog',
+                                                 path=service.full(),
+                                                 node=node)
+    blog_view = self.getPageByName(u'blog_view')
+    template_data[u'http_uri'] = self.host.getExtBaseURL(request, blog_view.getURL(service.full(), node))
+    if items:
+        template_data[u'updated'] = items[0].updated
+    else:
+        template_data[u'updated'] = time.time()
--- a/src/pages/blog/view/page_meta.py	Tue Mar 27 08:40:27 2018 +0200
+++ b/src/pages/blog/view/page_meta.py	Fri Mar 30 20:31:47 2018 +0200
@@ -13,7 +13,7 @@
 import re
 import cgi
 from sat.core.log import getLogger
-log = getLogger('pages/common/blog')
+log = getLogger('pages/blog/view')
 
 """generic blog (with service/node provided)"""
 name = u'blog_view'
--- a/src/pages/u/blog/page_meta.py	Tue Mar 27 08:40:27 2018 +0200
+++ b/src/pages/u/blog/page_meta.py	Fri Mar 30 20:31:47 2018 +0200
@@ -10,4 +10,4 @@
     # to be used by blog's url parser, so we don't skip parse_url
     data = self.getRData(request)
     service = data[u'service']
-    self.pageRedirect(u'blog', request, skip_parse_url=False, path_args=[service.full(), u'@'])
+    self.pageRedirect(u'blog_view', request, skip_parse_url=False, path_args=[service.full(), u'@'])
--- a/src/pages/u/page_meta.py	Tue Mar 27 08:40:27 2018 +0200
+++ b/src/pages/u/page_meta.py	Fri Mar 30 20:31:47 2018 +0200
@@ -33,4 +33,4 @@
 def prepare_render(self, request):
     data = self.getRData(request)
     self.checkCache(request, C.CACHE_PUBSUB, service=data[u'service'], node=None, short='microblog')
-    self.pageRedirect(u'blog', request)
+    self.pageRedirect(u'blog_view', request)