aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-08-03 00:01:30 +0530
committerBobby <[email protected]>2022-08-03 00:01:30 +0530
commitc5d897cc8029482f32e9feca04795a1abc36bbda (patch)
treea200443464ef521893a1d981cd09f7fb40954f8c
parentd2e3003f1f167a4f5d0721fd44be445d84ad1a61 (diff)
downloadthatcomputerscientist-c5d897cc8029482f32e9feca04795a1abc36bbda.tar.xz
thatcomputerscientist-c5d897cc8029482f32e9feca04795a1abc36bbda.zip
Define rules for static
-rw-r--r--thatcomputerscientist/settings.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py
index 080535e9..41d12c82 100644
--- a/thatcomputerscientist/settings.py
+++ b/thatcomputerscientist/settings.py
@@ -74,7 +74,7 @@ ROOT_URLCONF = 'thatcomputerscientist.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
+ 'DIRS': [ str(BASE_DIR / 'templates') ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -136,12 +136,16 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/'
+# STATIC_ROOT = BASE_DIR / "staticfiles"
+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.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
-STATIC_ROOT = BASE_DIR / "staticfiles"
EMAIL_USE_TLS = True
EMAIL_HOST = os.getenv('MAIL_HOST')