Commit 4ebe1c9d authored by Mavrick Jordan Lee's avatar Mavrick Jordan Lee

Created templates folder in project with a project-level template base.html....

Created templates folder in project with a project-level template base.html. Changed the settings to include project-level templates.
parent 8b9f2631
...@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ ...@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
""" """
from pathlib import Path from pathlib import Path
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
...@@ -55,7 +56,7 @@ ROOT_URLCONF = 'mavlee_reading.urls' ...@@ -55,7 +56,7 @@ ROOT_URLCONF = 'mavlee_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': [
......
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>{% block title %}Mav's Favorite Books and Authors{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
<div id="content">
{% block content %}{% endblock%}
</div>
{% block scripts%}{% endblock%}
</body>
</html>
\ No newline at end of file
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