我想根据我的要求自定义django-oscar模板,当我修改结帐页面时,就被这个错误所吸引:
TemplateSyntaxError at /checkout/thank-you/
Invalid block tag on line 132: 'oscar_thumbnail', expected 'endwith'. Did you forget to register or load this tag?
这是我的settings.py:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),
OSCAR_MAIN_TEMPLATE_DIR
]
,
# 'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.contrib.messages.context_processors.messages',
'oscar.apps.search.context_processors.search_form',
'oscar.apps.promotions.context_processors.promotions',
'oscar.apps.checkout.context_processors.checkout',
'oscar.apps.customer.notifications.context_processors.notifications',
'oscar.core.context_processors.metadata',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
],
},
},
]
我如何将templatetag注册到django-oscar中的自定义模板中?