首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在django-oscar中安装鸡蛋主题

在django-oscar中安装鸡蛋主题
EN

Stack Overflow用户
提问于 2015-06-01 17:01:09
回答 1查看 925关注 0票数 2

我在这里找到了django-oscar的主题:https://github.com/eggforsale/oscar-eggs-theme,但是没有可用的文档来安装它。我尝试替换oscar/templates目录中的相应文件,但不起作用。

EN

回答 1

Stack Overflow用户

发布于 2020-06-13 17:53:23

确保已将setting.py中的oscar模板文件夹更新为文档:

代码语言:javascript
复制
    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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30569478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档