From 89ff7642f7242564f7d480611bbbe81beea2116e Mon Sep 17 00:00:00 2001 From: palewire Date: Mon, 13 Mar 2023 18:04:17 -0700 Subject: [PATCH] Fix it --- bakery/tests/__init__.py | 4 +++- bakery/views/detail.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bakery/tests/__init__.py b/bakery/tests/__init__.py index b3aa10d..56b2e05 100644 --- a/bakery/tests/__init__.py +++ b/bakery/tests/__init__.py @@ -423,7 +423,9 @@ def test_build_cmd(self): def test_build_pathlib(self): with self.settings(BUILD_DIR=Path(__file__).parent / "_dist"): - call_command("build", **{'skip_media': True, 'verbosity': 3}) + call_command("build", **{'verbosity': 3}) + with self.settings(STATIC_ROOT=Path(__file__).parent / "_static"): + call_command("build", **{'verbosity': 3}) def test_unbuild_cmd(self): call_command("unbuild") diff --git a/bakery/views/detail.py b/bakery/views/detail.py index 5cc7921..22f7d55 100644 --- a/bakery/views/detail.py +++ b/bakery/views/detail.py @@ -45,7 +45,7 @@ def get_build_path(self, obj): would like your detail page at a different location. By default it will be built at get_url() + "index.html" """ - target_path = path.join(settings.BUILD_DIR, self.get_url(obj).lstrip('/')) + target_path = path.join(str(settings.BUILD_DIR), self.get_url(obj).lstrip('/')) if not self.fs.exists(target_path): logger.debug("Creating {}".format(target_path)) self.fs.makedirs(target_path)