我在这里找到了 django-oscar 的主题: https ://github.com/eggforsale/oscar-eggs-theme 但是没有可用于安装它的文档。我尝试替换 oscar/templates 目录中的相应文件,但它不起作用。
问问题
940 次
1 回答
0
确保您已将 setting.py 中的 oscar 模板文件夹更新为文档:
location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', x)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
location('templates'), # templates directory of the project
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
...
'oscar.core.context_processors.metadata',
],
},
},
]
https://django-oscar.readthedocs.io/en/latest/howto/how_to_handle_statics.html
于 2020-06-13T09:53:22.913 回答