mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Doc for scss
This commit is contained in:
@ -30,6 +30,9 @@ from django.conf import settings
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
Compiles scss in static folder for production
|
||||
"""
|
||||
help = "Compile scss files from static folder"
|
||||
|
||||
def compile(self, filename):
|
||||
|
@ -34,6 +34,11 @@ from core.scss.storage import ScssFileStorage, find_file
|
||||
|
||||
|
||||
class ScssProcessor(object):
|
||||
"""
|
||||
If DEBUG mode enabled : compile the scss file
|
||||
Else : give the path of the corresponding css supposed to already be compiled
|
||||
Don't forget to use compilestatics to compile scss for production
|
||||
"""
|
||||
prefix = iri_to_uri(getattr(settings, 'STATIC_URL', '/static/'))
|
||||
storage = ScssFileStorage()
|
||||
scss_extensions = [".scss"]
|
||||
|
@ -53,5 +53,8 @@ def datetime_format_python_to_PHP(python_format_string):
|
||||
|
||||
@register.simple_tag()
|
||||
def scss(path):
|
||||
"""
|
||||
Return path of the corresponding css file after compilation
|
||||
"""
|
||||
processor = ScssProcessor(path)
|
||||
return processor.get_converted_scss()
|
Reference in New Issue
Block a user