djangofloor.templatetags.pipeline

Emulate django-pipeline templatetags

Allows you to use the same javascript and stylesheet template tags if django-pipeline is not installed. If you add django-pipeline to your settings.INSTALLED_APPS, these versions are ignored, using the original ones. If you keep the default settings, django-pipeline is automatically detected and added, so you have nothing to do.

class djangofloor.templatetags.pipeline.PyScssCompiler[source]

SASS (.scss) compiler based on the Python library pyScss. (http://pyscss.readthedocs.io/en/latest/ ). However, this compiler is limited to SASS 3.2 and cannot compile modern projets like Bootstrap 4. Please use pipeline.compilers.sass.SASSCompiler if you use modern SCSS files.

compile_file(infile, outfile, outdated=False, force=False)[source]
match_file(filename)[source]
output_extension = 'css'
class djangofloor.templatetags.pipeline.RcssCompressor[source]

JS compressor based on the Python library slimit (http://pypi.python.org/pypi/slimit/ ).

compress_css(css)[source]
class djangofloor.templatetags.pipeline.TypescriptCompiler[source]

TypeScript (.ts) compiler using “tsc”. (https://www.typescriptlang.org ).

compile_file(infile, outfile, outdated=False, force=False)[source]
match_file(filename)[source]
output_extension = 'js'
djangofloor.templatetags.pipeline.javascript(key)[source]

insert all javascript files corresponding to the given key

djangofloor.templatetags.pipeline.stylesheet(key)[source]

insert all javascript files corresponding to the given key