fixed settings configuration such as Templates

parent 870734ea
...@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/ ...@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
from pathlib import Path from pathlib import Path
import os import os
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
...@@ -32,13 +33,13 @@ ALLOWED_HOSTS = [] ...@@ -32,13 +33,13 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
"bookshelf",
"django.contrib.admin", "django.contrib.admin",
"django.contrib.auth", "django.contrib.auth",
"django.contrib.contenttypes", "django.contrib.contenttypes",
"django.contrib.sessions", "django.contrib.sessions",
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"bookshelf",
] ]
MIDDLEWARE = [ MIDDLEWARE = [
...@@ -56,7 +57,7 @@ ROOT_URLCONF = "lancedamalerio_reading.urls" ...@@ -56,7 +57,7 @@ ROOT_URLCONF = "lancedamalerio_reading.urls"
TEMPLATES = [ TEMPLATES = [
{ {
"BACKEND": "django.template.backends.django.DjangoTemplates", "BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [], "DIRS": [os.path.join(BASE_DIR, 'templates')],
"APP_DIRS": True, "APP_DIRS": True,
"OPTIONS": { "OPTIONS": {
"context_processors": [ "context_processors": [
...@@ -118,7 +119,7 @@ USE_TZ = True ...@@ -118,7 +119,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/ # https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = "/static/" STATIC_URL = "/static/"
STATICFILES_DIRS = BASE_DIR, "static" STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment