From 8490e4ca089e3d4c04f42d49de1619dd284cb87e Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:43:41 -0500 Subject: [PATCH] feat: tup 706 be able to serve blog markup raw (#871) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: CMD-97 breadcrumbs for news via 1 template * idea: TUP-706 4.a.i change RSS feed render ⚠️ NOT WORKING! Fails with: > NoReverseMatch at /feed/ > '' is not a registered namespace * refactor: TUP-706 rename and document blog block * feat: TUP-706 render page with only (*_)content * fix: TUP-706 disable failed djangocms_blog_c… url * idea!: TUP-706 render blog base via custom app Fails, because it renders nothing. * feat!: TUP-706 render remote url content Load `/blog/remote`. BREAKING CHANGE: Changed `/blog` to `/blog/local` * chore: TUP-706 move an import higher in file * feat: TUP-706 render remote url via setting * fix: TUP-706 render blog customizations * fix: TUP-706 render feed ⚠️ ⚠️ Does NOT render feed items. * docs: TUP-706 describe each URL's problem * docs: TUP-706 describe each URL goal and status * feat: TUP-706 A.1+3.c remote markup via template * feat: TUP-706 A.1.a. support BLOG_MULTISITE * fix: TUP-706 A.1.a. cannot login to site 2 * Revert "fix: TUP-706 A.1.a. cannot login to site 2" This reverts commit 6bece398c8d86beeee6b7852f5889cad6eb55480. This did not fix anything. `SESSION_COOKIE_SECURE=False` is still required locally. * docs: TUP-706 feed status (ineffectual) * docs: tup-706 urls for local and remote * feat(poc): TUP-706 get news from remote url Messy but functional! * chore: remove test print statements from feeds * core: clean up views * core: clean up views more * refactor: switch order of methods in view class * feat: TUP-706 edit links via get_client_markup() * fix: TUP-706 broken links - ✓ fix links to articles - ✓ fix pagination links * feat: isolate breadcrumbs from content and news * chore: remove unnecessary app This app is fom a different branch. * chore: remove unnecessary middleware This middleware is fom a different branch. * fix: do not load missing app and middleware * fix: remove unnecessary setting This setting is from another branch. * fix: use correct name for app_content * style: new line * fix: raw template logic outdated * fix: bad merge resolution * fix: bad merge resolution * docs: how to serve raw content --- taccsite_cms/settings_custom.example.py | 4 ++++ taccsite_cms/templates/raw.html | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100755 taccsite_cms/templates/raw.html diff --git a/taccsite_cms/settings_custom.example.py b/taccsite_cms/settings_custom.example.py index 5ad8ff017..e347a3447 100644 --- a/taccsite_cms/settings_custom.example.py +++ b/taccsite_cms/settings_custom.example.py @@ -40,6 +40,10 @@ ('guides/data_transfer.html', 'Guide: Data Transfer'), ('guides/data_transfer.globus.html', 'Guide: Globus Data Transfer'), ('guides/portal_technology.html', 'Guide: Portal Technology Stack'), + + # WARNING: Not intuitive to unset, so only enable as needed e.g. + # - serve Blog such that it can be injected into another CMS + # ('raw.html', 'Raw'), ) ######################## diff --git a/taccsite_cms/templates/raw.html b/taccsite_cms/templates/raw.html new file mode 100755 index 000000000..f4df3983f --- /dev/null +++ b/taccsite_cms/templates/raw.html @@ -0,0 +1,10 @@ +{# To reduce output to only content #} +{% load cms_tags %} + +{# To remove container and breadcrumbs #} +{% block content %} + {% block cms_content %} + {% placeholder "content" %} + {% endblock cms_content %} + {% block app_content %}{% endblock app_content %} +{% endblock content %}