Skip to content

Commit

Permalink
fix: static in deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Meefx committed Nov 1, 2023
1 parent b0d7149 commit d89d2e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion readnow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',

]

ROOT_URLCONF = 'readnow.urls'
Expand Down Expand Up @@ -137,8 +139,11 @@

STATIC_URL = 'static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
SECURE_CROSS_ORIGIN_OPENER_POLICY = None

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ psycopg2-binary
requests
urllib3
django-environ
whitenoise

0 comments on commit d89d2e8

Please sign in to comment.