0
我一直在努力讓Django識別我的SCSS文件(我可能會濫用SCSS/SASS/LESS術語......他們的關係混淆了我)。我正在使用django-libsass
和compress
,這兩者看起來非常直截了當。我的頁面給了我錯誤「資源解釋爲樣式表,但使用MIME類型application/octet-stream傳輸:」。它正在加載頁面,但沒有顯示我的樣式。Django項目不識別SCSS文件
我不確定人們需要看什麼。我的模板包括:
<link href="{% static 'css/blog.scss' %}" rel="stylesheet">
(這工作得很好,當它是CSS)
設置:
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# other finders..
'compressor.finders.CompressorFinder',
)
呃。咄。謝謝。 – thumbtackthief