From 81c805e406d3244f75b600c0b085bbf985d981f0 Mon Sep 17 00:00:00 2001 From: Michael Yick Date: Sun, 7 May 2023 00:14:14 -0500 Subject: [PATCH] SegmentSummaryPanel now has a template_name This was added because of a crash in Cavemanon/RockFreeMedia that had to do with wagtail expecting rendered components, such as SegmentSummaryPanel, to have a template_name before it would render it. I do not believe, in this circumstance, the SegmentSummaryPanel is used for anything, and this is just an ad-hoc band-aid to get the software working. --- setup.py | 11 ++++++----- src/wagtail_personalisation/wagtail_hooks.py | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 5334e19..53886f1 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ install_requires = [ "user-agents>=1.1.0", "wagtailfontawesome>=1.2.1", "pycountry", + "python-dotenv" ] tests_require = [ @@ -30,10 +31,10 @@ docs_require = [ "sphinx_rtd_theme>=0.4.0", ] -with open("README.rst") as fh: - long_description = re.sub( - "^.. start-no-pypi.*^.. end-no-pypi", "", fh.read(), flags=re.M | re.S - ) +#with open("README.rst") as fh: +# long_description = re.sub( +# "^.. start-no-pypi.*^.. end-no-pypi", "", fh.read(), flags=re.M | re.S +# ) setup( name="wagtail-personalisation", @@ -52,7 +53,7 @@ setup( package_dir={"": "src"}, include_package_data=True, license="MIT", - long_description=long_description, + #long_description=long_description, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", diff --git a/src/wagtail_personalisation/wagtail_hooks.py b/src/wagtail_personalisation/wagtail_hooks.py index 8a0553d..c8bd048 100644 --- a/src/wagtail_personalisation/wagtail_hooks.py +++ b/src/wagtail_personalisation/wagtail_hooks.py @@ -222,6 +222,8 @@ class SegmentSummaryPanel(SummaryItem): site and allowing quick access to the Segment dashboard. """ + template_name = "Null" + print(template_name) order = 2000