在django-oscar安装鸡蛋主题

时间:2015-06-01 09:01:09

标签: python themes django-oscar

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

1 个答案:

答案 0 :(得分:0)

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

    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