Getting ready

Make sure that you have the request context processor included in the TEMPLATES['OPTIONS']['context_processors'] setting, as follows:

# myproject/settings/_base.py
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "myproject", "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"django.template.context_processors.media",
"django.template.context_processors.static",
"sekizai.context_processors.sekizai",
]
},
}
]

You should also create the core app, if you haven't done so already, and place it under INSTALLED_APPS in the settings:

INSTALLED_APPS = [
# …
"myproject.apps.core",
# …
]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.198.43