Reputation: 4669
I've got error with django sitemap view.
TemplateDoesNotExist at /sitemap.xml
sitemap_index.xml
Probably something wrong with template loaders, but I can't figure out what exactly.
There is my TEMPLATE config:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'OPTIONS': {
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
],
'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.core.context_processors.media',
],
},
},
]
Does anyone have suggestions?
Upvotes: 4
Views: 925
Reputation: 91
Make sure you have this:
INSTALLED_APPS = [
...
'django.contrib.sitemaps',
...
]
Upvotes: 9