From 6426edb062daa22dacf2949fc4a7b8473c8ceee8 Mon Sep 17 00:00:00 2001 From: Adora Date: Sat, 27 Jul 2024 09:30:27 -0600 Subject: [PATCH] Try to fix collectstatic and prod deploy --- .github/workflows/poetry-django.yml | 2 +- myFacegram/settings.py | 16 ++++++++-------- myFacegram/settings_production.py | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/poetry-django.yml b/.github/workflows/poetry-django.yml index f8b1924..7abc555 100644 --- a/.github/workflows/poetry-django.yml +++ b/.github/workflows/poetry-django.yml @@ -55,7 +55,7 @@ jobs: AWS_DB_PASSWORD: ${{ secrets.AWS_DB_PASSWORD }} AWS_DB_HOST: ${{ secrets.AWS_DB_HOST }} AWS_DB_PORT: ${{ secrets.AWS_DB_PORT }} - run: poetry run python manage.py collectstatic --noinput + run: poetry run python manage.py collectstatic --noinput --clear - name: Archive static files uses: actions/upload-artifact@v4 diff --git a/myFacegram/settings.py b/myFacegram/settings.py index dd517c9..a8de0d8 100644 --- a/myFacegram/settings.py +++ b/myFacegram/settings.py @@ -136,16 +136,16 @@ PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = os.path.join(BASE_DIR, 'assets') -STATIC_URL = '/static/' +# STATIC_URL = '/static/' -STATICFILES_DIRS = [ - (BASE_DIR / 'static'), -] +# STATICFILES_DIRS = [ +# (BASE_DIR / 'static'), +# ] -STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', -] +# STATICFILES_FINDERS = [ +# 'django.contrib.staticfiles.finders.FileSystemFinder', +# 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# ] SRF_COOKIE_SECURE=True LOGIN_URL = '/users/login/' diff --git a/myFacegram/settings_production.py b/myFacegram/settings_production.py index 9ad8345..daf4135 100644 --- a/myFacegram/settings_production.py +++ b/myFacegram/settings_production.py @@ -152,14 +152,14 @@ PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = os.path.join(BASE_DIR, 'assets') STATIC_URL = 'https://stariluz.github.io/myFacegram/' -STATICFILES_DIRS = [ - (BASE_DIR / 'static'), -] - -STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', -] +# STATICFILES_DIRS = [ +# (BASE_DIR / 'static'), +# ] + +# STATICFILES_FINDERS = [ +# 'django.contrib.staticfiles.finders.FileSystemFinder', +# 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# ] SRF_COOKIE_SECURE=True LOGIN_URL = '/users/login/'