我们在自己的服务器上安装了 Wirecloud,使用 Docker Hub 上的 Docker 映像(最新版本 = 0.9.1)。使用此处的说明:https ://wirecloud.readthedocs.io/en/latest/development/platform/themes/我们尝试遵循“基本主题”部分。但是目前还不清楚主题应该放在文件系统的哪个位置。
1. created the directory structure in the example
2. created a file __init__.py with one line: parent = "wirecloud.defaulttheme"
3. created a file _variables.scss and pasted the example into it. Put the file in babblerTheme/static/css/
4. created a header.png image and placed it in babblerTheme/static/images/logos/
5. Then updated settings.py with the name of our basic theme with the setting: THEME_ACTIVE = "babblerTheme"
6. Then ran python manage.py collectstatic --noinput
我们得到错误:
...文件“/usr/local/lib/python2.7/site-packages/wirecloud/platform/themes.py”,第 82 行,在 get_theme_metadata 中引发 ValueError(“%s 不是有效的 WireCloud 主题”% theme_name ) ValueError: babblerTheme 不是有效的 WireCloud 主题
我们尝试将主题目录放在以下位置,但没有任何运气:
/opt/wirecloud_instance/wirecloud_instance/babblerTheme
/opt/wirecloud_instance/babblerTheme
/usr/local/lib/python2.7/site-packages/wirecloud/babblerTheme
所有三个地方,同样的无信息错误。
这应该很容易,但我已经花了大半天的时间。我可以通过更改默认主题的内容来解决这个错误,但我希望在升级 Wirecloud 时会出现问题。
我们应该怎么做才能让 Wirecloud 选择我们的自定义主题?