Projects tagged ‘django’, ‘python’, and ‘template’


Jump to tag:

Projects tagged ‘django’, ‘python’, and ‘template’

Filtered by Project Tags django python template

[11 total ]

0 Users

Project summarydjango-compressor was inspired by django-compress and planned as its fork, but several architecture disatvantages made me to write fully new application. Compressor allows to define ... [More] regrouped/postcompiled content "on the fly" inside of django template and output it as inline content, or as static cached file/url with versioning. PurposeThe main purpose for this app is to enable of using of content compilers at develop time in transparent fashion. Because i hate to jump between syntaxes during work. MoreIn basic it just makes reordering of nodes grouped with {% compress %}{%endcompress%} tags. Together with that, it supports easy integration with external compilers (Clevercss, PyCow, xslt, etc.) and/or output wrappers. It supports compiled files versioning and precompile caching, respects templates hierarchy to make debugging easier. It allows to use template inheritance, block.super and passes context to custom compilers. Basic exampleTemplate test/base.html: Some title {% load compressor_tags %}{% compressed "css" "css_file_link" %} {% block content %}{%endblock%} Template test/test.html: {% extends "test/base.html" %} {% block content %} {% load compressor_tags %} {% compress_file "css" "media/css/reset.css" %}{% compress_file "css" "media/css/base.css" %} {% compress_file "css" "media/css/fonts.css" %}{% compress_file "css" "media/css/grids.css" %} {% compress "css" %}a{color: #ff0000;}{%endcompress%} This is my link {%endblock%}All that content will be rendered to: Some title This is my link where /static/CACHE/compressor/0606419490efcbcd3ea9d0f316db8567_nodes_326.css is symlink, wich lays in static zone and contains all yui styles together with your style at the end. See also:More examples Installation Configuration Perfomance SourceLink to latest source can be found at my blog in projects section. [Less]
Created 3 months ago.