Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.074.035 Times

django-css for Linux 2.2.1

Company: David Ziegler
Date Added: June 19, 2013  |  Visits: 333

django-css for Linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (20 downloads)

django-css is a fork of the django_compressor app that makes it easy to use CSS compilers with your Django projects. CSS compilers extend CSS syntax to include more powerful features such as variables and nested blocks, and pretty much rock all around. Django-css can currently be used with any CSS compiler that can be called from the command line, such as HSS, Sass, CleverCSS, or LESS.<br /><br />Thanks to django_compressor, django-css will also version and compress linked and inline javascript or CSS into a single cached file. These cached files will get served through whatever frontend server you use for serving static files, because serving static files through Django is just silly.<br /><br />Note: The pypi version of CleverCSS is buggy and will not work with django-css. Use the updated version on github: http://github.com/dziegler/clevercss/tree/master<br /><br />Installation<br /><br />Add compressor to INSTALLED_APPS. You should also enable some type of caching backend such as memcached, e.g. CACHE_BACKEND = 'memcached://127.0.0.1:11211/'. Don't worry, your static files are not being served through Django. The only thing stored in cache is the path to the static file.<br /><br />Usage<br /><br />Syntax:<br /><br />{% load compress %}<br />{% compress < js/css > %}<br />< html of inline or linked JS/CSS ><br />{% endcompress %}<br /><br />Examples:<br /><br />{% load compress %}<br />{% compress css %}<br />< link rel="stylesheet" href="/media/css/one.css" type="text/css" charset="utf-8" ><br />< link rel="stylesheet" href="/media/css/two.sass" type="text/css" charset="utf-8" ><br />{% endcompress %}<br /><br />Which would be rendered like:<br /><br />< link rel="stylesheet" href="/media/CACHE/css/f7c661b7a124.css" type="text/css" media="all" charset="utf-8" ><br /><br />or:<br /><br />{% load compress %}<br />{% compress js %}<br />< script src="/media/js/one.js" type="text/javascript" charset="utf-8" >< /script ><br />< script type="text/javascript" charset="utf-8" >obj.value = "value";< /script ><br />{% endcompress %}<br /><br />Which would be rendered like:<br /><br />< script type="text/javascript" src="/media/CACHE/js/3f33b9146e12.js" charset="utf-8" >< /script ><br /><br />If you're using xhtml, you should use:<br /><br />{% load compress %}<br />{% compress css xhtml %}<br />< link rel="stylesheet" href="/media/css/one.css" type="text/css" charset="utf-8" / ><br />< link rel="stylesheet" href="/media/css/two.sass" type="text/css" charset="utf-8" / ><br />{% compress css %}<br /><br />Which would be rendered like:<br /><br />< link rel="stylesheet" href="/media/CACHE/css/f7c661b7a124.css" type="text/css" media="all" charset="utf-8" / ><br /><br />Settings<br /><br />COMPILER_FORMATS default: {}<br /> A dictionary specifying the compiler and arguments to associate with each extension.<br /><br />django-css will select which CSS compiler to use based off a file's extension. For example:<br /><br />COMPILER_FORMATS = {<br /> '.sass': {<br /> 'binary_path':'sass',<br /> 'arguments': '*.sass *.css'<br /> },<br /> '.hss': {<br /> 'binary_path':'/home/dziegler/hss',<br /> 'arguments':'*.hss'<br /> },<br /> '.ccss': {<br /> 'binary_path':'clevercss',<br /> 'arguments': '*.ccss'<br /> },<br />}<br /><br />will use Sass to compile *.sass files, HSS to compile *.hss files, and clevercss to compile *.ccss files. *.css files will be treated like normal css files.<br /><br />binary_path is the path to the CSS compiler. In the above example, sass and clevercss are installed in my path, and hss is located at /home/dziegler/hss.<br /><br />arguments are arguments you would call in the command line to the compiler. The order and format of these will depend on the CSS compiler you use. Prior to compilation, * will be replaced with the name of your file to be compiled.<br /><br />If this seems a little hacky, it's because I wanted to make it easy to use whatever CSS compiler you want with as little setup as possible.<br /><br />COMPRESS default: the opposite of DEBUG<br /> Boolean that decides if compression will happen.<br />COMPRESS_CSS_FILTERS default: []<br /> A list of filters that will be applied to CSS.<br />COMPRESS_JS_FILTERS default: ['compressor.filters.jsmin.JSMinFilter'])<br /> A list of filters that will be applied to javascript.<br />COMPRESS_URL default: MEDIA_URL<br /> Controls the URL that linked media will be read from and compressed media will be written to.<br />COMPRESS_ROOT default: MEDIA_ROOT<br /> Controls the absolute file path that linked media will be read from and compressed media will be written to.<br />COMPRESS_OUTPUT_DIR default: "CACHE"<br /> Controls the directory inside COMPRESS_ROOT that compressed files will be written to.<br /><br />Notes<br /><br />All relative url() bits specified in linked CSS files are automatically converted to absolute URLs while being processed. Any local absolute urls (those starting with a '/') are left alone.<br /><br />Stylesheets that are @import'd are not compressed into the main file. They are left alone.<br /><br />Set the media attribute as normal on your and elements and the combined CSS will be wrapped in @media blocks as necessary.<br /><br />Linked files must be on your COMPRESS_URL (which defaults to MEDIA_URL). If DEBUG is true off-site files will throw exceptions. If DEBUG is false they will be silently stripped.<br /><br />CSS files are compiled only when needed, because it would be silly to re-compile on every page request. The way this works is that django-css looks at the time your css was last modified, and the time your CleverCSS, HSS, etc file was modified. If the modification time for the CleverCSS, HSS, etc file is after the css file's, then the css file gets re-compiled.<br /><br />If COMPRESS is False (defaults to the opposite of DEBUG) CSS files will still be compiled if needed, but files will not be compressed and versioned.<br /><br />The pypi version of CleverCSS is buggy and will not work with django-css. Use the updated version on github: http://github.com/dziegler/clevercss/tree/master<br /><br />#md5=b4ab5e9a8d0079abafdbf0d5e67c579d

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Charset Dquotutf Quot Clevercss Compiler Compress Compressed Controls Css Css Linux Debug Default Django Django Css Djangocss Files Likelt Linked Linux Media Rel Dquotstylesheetquot Script Static Type Dquottextcssquot Version
Users rating: 0/10

License: Freeware Size: 10.24 KB
DJANGO-CSS FOR LINUX RELATED
Compression Tools  -  AppCompactor 2.2
AppCompactor is designed to allow you to easily compress applications to decrease their size on disk and increase performance when running from slow storage media such as flash drives. It is packaged as a portable application, so you can work...
 
Development Editors  -  Effect Compiler New
Effect Compiler is a rule file that allows you to compile Direct3D / HLSL effect files directly in Visual Studio. The default way is to compile all .fx files at runtime, but as files are getting bigger, compile time increases rapidly. However, in...
 
Development Editors  -  BEE Lisp 1.1
BEE Lisp is a superficial expandable compiler for Lisp language which allows to create completely independent EXE and DLL files. In contrast with the majority of analogues executable files created by this compiler do not demand presense of any...
5.12 MB  
Utilities  -  Featherweight Linux 1.3
Featherweight Linux is my Live-CD installable Linux distribution that I remastered from Feather Linux, which is built on knoppix technology. Youll find some great people over at Feather and you can find some good documentation there. Their goal...
272 MB  
Compression Tools  -  Zip & Resize Photos 2011
Zip & Resize Photos is a specialized program that will compress digital images because this special type of files are not very well compressed by usual file compression applications. Zip & Resize Photos, based on our Advanced JPEG Compressor...
 
File Synchronizers  -  Ext2 compression extension 0.4.50-0403
Ext2 compression extension (E2compr) is a small patch against the ext2 filesystem that allows on-the-fly compression and decompression. It compresses only regular files; the administrative data (superblock, inodes, directory files etc.) are not...
 
Development Tools  -  Roadsend PHP Compiler 2.9.4
Roadsend PHP Compiler is a free, open source native compiler for the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter.Roadsend Compiler can build online web applications with Fast/CGI,...
2.71 MB  
File Renamers  -  PDF Compressor 3.3
There are lots of scanned PDF files need to be copied, transferred or exchanged often on the Internet. However, scanned PDF documents are made from images and the file sizes are very large. It is not easy to send emails with large PDF...
9.74 MB  
Libraries  -  zlibc 0.9k
Zlibc is a read-only compressed file-system emulation. It allows executables to uncompress their data files on the fly. No kernel patch, no re-compilation of the executables and the libraries is needed. Using gzip -9, a compression ratio of 1:3...
78.85 KB  
Programming  -  Jikes 1.22
JikesTM is a compiler that translates JavaTM source files as defined in The Java Language Specification into the bytecoded instruction set and binary format defined in The Java Virtual Machine Specification. You may wonder why the world needs...
860.16 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB