SCSS 적용하기
1. install libs
pip install libsass django-compressor django-sass-processor
2. Settings
INSTALLED_APPS += [
...
'sass_processor',
...
]
...
...
SASS_OUTPUT_STYLE = 'compact'
SASS_PROCESSOR_ENABLED = True
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'sass_processor.finders.CssFinder',
]
3. 사용법
{% load sass_tags %}
<link href="{% sass_src 'css/filename.scss' %}" rel="stylesheet" type="text/css" />