Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Latest commit

 

History

History
41 lines (25 loc) · 1.98 KB

Usage.textile

File metadata and controls

41 lines (25 loc) · 1.98 KB

Usage

Describes how to use django-compress when it is installed and configured

Automated generation

If COMPRESS and COMPRESS_AUTO is enabled (True), the source files will be automatically updated, and re-generated IF NEEDED when invoked from the templatetags. The last modified time of the files will be compared, and if any of the source-files is newer than the output-file, the file will be re-generated.

Management command

You can update and force updates of the compressed file(s) with the management command “synccompress”. This makes it possible to keep the files updated manually.

The command is


./manage.py synccompress

(assuming you are in you project-folder that contains manage.py). To force all files to be re-generated, use the argument —force (e.g. ./manage.py synccompress —force)

Templatetags

django-compress includes two template tags: compressed_css and compressed_js, in a template library called compressed

They are used to output the and