diff --git a/engine/core/management/commands/initialize.py b/engine/core/management/commands/initialize.py index faf35ec9..e1c7e2bb 100644 --- a/engine/core/management/commands/initialize.py +++ b/engine/core/management/commands/initialize.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) class Command(BaseCommand): def handle(self, *args: list[Any], **options: dict[Any, Any]) -> None: - self.stdout.write(self.style.NOTICE("Initializing must-have instances...")) + self.stdout.write("Initializing must-have instances...") Vendor.objects.get_or_create(name="INNER") Group.objects.all() diff --git a/evibes/settings/base.py b/evibes/settings/base.py index 3b08748c..a2eda7cd 100644 --- a/evibes/settings/base.py +++ b/evibes/settings/base.py @@ -292,18 +292,10 @@ DEFAULT_AUTO_FIELD: str = "django.db.models.BigAutoField" TIME_ZONE: str = getenv("TIME_ZONE", "Europe/London") -STATIC_URL: str = ( - f"http://api.{getenv('EVIBES_BASE_DOMAIN')}/static/" - if DEBUG - else f"https://api.{getenv('EVIBES_BASE_DOMAIN')}/static/" -) +STATIC_URL: str = "/static/" STATIC_ROOT: Path = BASE_DIR / "static" -MEDIA_URL: str = ( - f"http://api.{getenv('EVIBES_BASE_DOMAIN')}/media/" - if DEBUG - else f"https://api.{getenv('EVIBES_BASE_DOMAIN')}/media/" -) +MEDIA_URL: str = "/media/" MEDIA_ROOT: Path = BASE_DIR / "media" AUTH_USER_MODEL: str = "vibes_auth.User" diff --git a/nginx.conf b/nginx.conf index f5937cdd..c58a355d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -137,6 +137,11 @@ server { default_type text/plain; } + location /static/ { + add_header Access-Control-Allow-Origin "*"; + root /var/jenkins/workspace/evibes; + } + location /favicon.ico { add_header Access-Control-Allow-Origin "*"; root /var/jenkins/workspace/evibes/static;