我正在进行FITMAN智能工厂试用5演示(http://www.fitman-fi.eu/),我需要自定义WireCloud徽标图标来改变工厂图标。
有关于如何做到这一点的文档吗?
发布于 2014-10-16 10:05:19
目前,最好的方法是使用STATICFILES_DIRS和STATICFILES_FINDERS设置来覆盖当前主题中的某些文件。例如,如果使用默认配置,可以将以下行添加到settings.py文件中:
STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder',) + STATICFILES_FINDERS
STATICFILES_DIRS = (path.join(BASEDIR, 'static'),)
考虑到FileSystemFinder应该是STATICFILES_FINDERS设置的第一个值,所以像STATICFILES_FINDERS += ('django.contrib.staticfiles.finders.FileSystemFinder',)
这样的东西不能工作。
一旦更新了settings.py,您就必须在setting.py所在的相同位置创建一个静态文件夹。在此文件夹中创建的每个文件都将覆盖WireCloud提供的文件。在您的例子中,有趣的文件是:
您可以从实例根目录下的静态文件夹中获取文件的原始版本(默认情况下,静态文件被收集到的位置)。如果您想要更新任何重写的文件,则需要运行收集器静态命令:
$ python manage.py collectstatic
示例
如果在/opt/ WireCloud _wirecloud上有一个实例,则可以运行以下命令:
$ cd /opt/wirecloud_instance
$ <your_editor_of_choice> wirecloud_instance/settings.py
# Change the STATICFILES_FINDERS and STATICFILES_DIRS settings and close the editor
$ mkdir -p wirecloud_instance/static/images
$ cp <your_logo> wirecloud_instance/static/images/wirecloud_logo.png
$ python manage.py collectstatic
发布于 2014-10-15 07:26:25
您应该签入{WC安装dir}/静态/映像/
我认为您可能想要更改的是头-logo.png
https://stackoverflow.com/questions/26357547
复制相似问题