django static precompiler

时间:2018-05-29 18:06:06

标签: python django django-templates django-staticfiles django-static-precompiler

我正在尝试编译我的scss文件,这是我的错误:

  

异常值:关系“static_precompiler_dependency”不存在

以下是我的html头中的内容:

<link rel="stylesheet" type="text/css" href="{% static "css/main.scss"|compile %}">

在我的setting.py中:

STATIC_URL = '/static/'
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static"),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static/css')

我可以看到COMPILED文件夹。但仍有异常错误

1 个答案:

答案 0 :(得分:3)

安装后似乎无法迁移。

https://github.com/andreyfedoseev/django-static-precompiler/blob/master/static_precompiler/models.py

它有一个名为Dependency的模型。该模型用于导入的scss文件。

enter image description here