【问题标题】:Compilation problems with django static precompilerdjango静态预编译器的编译问题
【发布时间】:2018-11-08 11:09:57
【问题描述】:

我正在尝试编译我的 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 文件夹。但是仍然有那个异常错误

【问题讨论】:

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


    【解决方案1】:

    安装后好像没有迁移。

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

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

    【讨论】:

      猜你喜欢
      • 2018-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多