From 7d243012adfab240937202145fd9b94fd9777eb6 Mon Sep 17 00:00:00 2001 From: autodeploy <benoit@startinblox.com> Date: Mon, 10 Jun 2024 11:00:25 +0200 Subject: [PATCH] fix: prev --- djangoldp/management/commands/generate_static_content.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/djangoldp/management/commands/generate_static_content.py b/djangoldp/management/commands/generate_static_content.py index a91ed244..7b553797 100644 --- a/djangoldp/management/commands/generate_static_content.py +++ b/djangoldp/management/commands/generate_static_content.py @@ -6,6 +6,10 @@ from django.conf import settings from django.apps import apps from urllib.parse import urlparse, urlunparse +base_uri = getattr(settings, 'BASE_URL', '') +max_depth = getattr(settings, 'MAX_RECURSION_DEPTH', 5) +request_timeout = getattr(settings, 'SSR_REQUEST_TIMEOUT', 10) + class Command(BaseCommand): help = 'Generate static content for models with a specific meta attribute' @@ -14,9 +18,6 @@ class Command(BaseCommand): if not os.path.exists(output_dir): os.makedirs(output_dir, exist_ok=True) - base_uri = getattr(settings, 'BASE_URL', '') - max_depth = getattr(settings, 'MAX_RECURSION_DEPTH', 5) - request_timeout = getattr(settings, 'SSR_REQUEST_TIMEOUT', 10) for model in apps.get_models(): if hasattr(model._meta, 'static_version'): -- GitLab