Browse Source

Fix static files location

Daoud Clarke 1 year ago
parent
commit
03293384aa
3 changed files with 4 additions and 1 deletions
  1. 0 1
      mwmbl/settings_common.py
  2. 3 0
      mwmbl/settings_dev.py
  3. 1 0
      mwmbl/settings_prod.py

+ 0 - 1
mwmbl/settings_common.py

@@ -104,7 +104,6 @@ USE_TZ = True
 # https://docs.djangoproject.com/en/4.2/howto/static-files/
 # https://docs.djangoproject.com/en/4.2/howto/static-files/
 
 
 STATIC_URL = 'static/'
 STATIC_URL = 'static/'
-STATICFILES_DIRS = [str(Path(__file__).parent.parent / "front-end" / "dist")]
 
 
 # Default primary key field type
 # Default primary key field type
 # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
 # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

+ 3 - 0
mwmbl/settings_dev.py

@@ -13,6 +13,9 @@ DATABASES = {
 }
 }
 
 
 
 
+STATICFILES_DIRS = [str(Path(__file__).parent.parent / "front-end" / "dist")]
+
+
 DEBUG = True
 DEBUG = True
 ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
 ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
 
 

+ 1 - 0
mwmbl/settings_prod.py

@@ -9,6 +9,7 @@ SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
 
 
 
 
 STATIC_ROOT = "/app/static/"
 STATIC_ROOT = "/app/static/"
+STATICFILES_DIRS = ["/front-end-build/"]
 
 
 
 
 DATABASES = {'default': dj_database_url.config(default=os.environ["DATABASE_URL"])}
 DATABASES = {'default': dj_database_url.config(default=os.environ["DATABASE_URL"])}