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

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

Serving Software Downloads in 956 Categories, Downloaded 50.335.212 Times

django-css for Linux 2.2.1

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

django-css for Linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (44 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
USER REVIEWS
More Reviews or Write Review


DJANGO-CSS FOR LINUX RELATED
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  
Networking  -  External Files Optimizer 0.1.2
automatically combine and compress css/js files generate with wp_head() and wp_footer()
10 KB  
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 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...
 
Database Tools  -  MySQL Charset correction tool 1.0
MySQL charset correction tool is excellent tool for converting charsets in MySQL databases without changing columns values. It can be used after MySQL upgrade or after restoring missing databases to repair or to convert charset. This problem is...
10 KB  
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  
Utilities  -  DistCC LiveCD 3.3.6
Distcc Livecd is a small bootable cdrom that contains a uClibc Linux system, the GNU compiler and a distcc daemon. The purpose of this CD is to be able to borrow compile CPU power from computers without installing anything on the harddisk. The...
40.1 MB  
Backup Utilities  -  Abakt 0.9.4
Abakt is a free, open source, backup tool for Windows. Using a combination of advanced filters you can select files and directories to compress, copy or move. Filters: You can select files by creating filters that are based on the properties of...
1.03 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
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  
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  -  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  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB