Skip to content

Commit

Permalink
Use new TEMPLATES setting to define where templates are
Browse files Browse the repository at this point in the history
This set value tells to load templates from app's
subdirectory named "templates"
  • Loading branch information
ilesoft committed Nov 21, 2024
1 parent 4455fdf commit 2fcfaea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions web/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@

ROOT_URLCONF = "urls"

TEMPLATE_DIRS = (
hakemisto + "/templates",
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
hakemisto + "/templates",
],
"APP_DIRS": True,
},
]

INSTALLED_APPS = [
"django.contrib.auth",
Expand Down

0 comments on commit 2fcfaea

Please sign in to comment.