From b1bf88eada001000ac454bb87f40b1afc546a273 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Sat, 21 Oct 2023 18:38:49 +0200 Subject: [PATCH] Add: static files config --- archivist/core/settings.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/archivist/core/settings.py b/archivist/core/settings.py index d76d25b..9e428c2 100644 --- a/archivist/core/settings.py +++ b/archivist/core/settings.py @@ -158,10 +158,26 @@ USE_TZ = True ############################################################# -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/4.0/howto/static-files/ +############################################################# +# SRC: https://devcenter.heroku.com/articles/django-assets + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.9/howto/static-files/ +############################################################# +STATIC_ROOT = os.path.join(CORE_DIR, 'staticfiles') +STATIC_URL = '/static/' + +# Extra places for collectstatic to find static files. +STATICFILES_DIRS = ( + os.path.join(CORE_DIR, 'apps/static'), + os.path.join(BASE_DIR, 'static'), +) + + +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +############################################################# -STATIC_URL = 'static/' # Default primary key field type # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field