From bd3397d1f67d0a4310fe9471b06acb4f254efb3c Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:48:37 -0500 Subject: [PATCH] docs: TUP-706 feed status (ineffectual) --- apps/djangocms_blog_customizations/feeds.py | 14 +++++++------- apps/djangocms_blog_customizations/urls.py | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/djangocms_blog_customizations/feeds.py b/apps/djangocms_blog_customizations/feeds.py index a281c9567..da8c65bc8 100644 --- a/apps/djangocms_blog_customizations/feeds.py +++ b/apps/djangocms_blog_customizations/feeds.py @@ -5,15 +5,13 @@ from djangocms_blog.settings import get_setting from djangocms_blog.cms_appconfig import BlogConfig -import logging - -logger = logging.getLogger(f"portal.{__name__}") - +# XXX: This file is loaded, but it does NOT override the feed +# XXX: Logging via logger fails anywhere; via print fails inside any method class LatestEntriesFeed(DjangoCMSBlogLatestEntriesFeed): feed_type = Rss201rev2Feed feed_items_number = get_setting("FEED_LATEST_ITEMS") - link = "/blog/" + print(f"CUSTOM FEED | FEED_LATEST_ITEMS: {feed_items_number}") def __call__(self, request, *args, **kwargs): namespace = get_setting("AUTO_NAMESPACE") @@ -22,11 +20,13 @@ def __call__(self, request, *args, **kwargs): self.namespace = get_setting("AUTO_NAMESPACE") self.config = BlogConfig.objects.get(namespace=namespace) - logger.debug(f"CUSTOM FEED | NAMESPACE: {self.namespace}, CONFIG: {self.config}") + print(f"CUSTOM FEED | NAMESPACE: {self.namespace}, CONFIG: {self.config}") return super().__call__(request, *args, **kwargs) def items(self): items = super().items() - logging.debug(f"CUSTOM FEED | FEED ITEMS: {items}") + + print(f"CUSTOM FEED | FEED ITEMS: {items}") + return items diff --git a/apps/djangocms_blog_customizations/urls.py b/apps/djangocms_blog_customizations/urls.py index d00a52e22..25c765243 100644 --- a/apps/djangocms_blog_customizations/urls.py +++ b/apps/djangocms_blog_customizations/urls.py @@ -8,7 +8,8 @@ urlpatterns = [ # To render styled Blog feed # XXX: Does NOT style the feed - # XXX: Does NOT render items within the feed + # XXX: Does NOT customize the feed + # FAQ: See feed root at `/news/feed/`, items at `/news/feed/fb` re_path(r'^feed/', LatestEntriesFeed(), name='feed'), # To render current blog, content only (no Core-CMS base.html)