From 984d2c4927a256d5a401837dc41784e7f60306c8 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 21 Jan 2011 13:34:30 +0100 Subject: [PATCH] Added Sphinx docs. --- .gitignore | 3 +- README.rst | 234 +---------------- docs/Makefile | 130 ++++++++++ .../_theme/compressor/static/compressor.css_t | 238 +++++++++++++++++ docs/_theme/compressor/theme.conf | 3 + docs/conf.py | 216 ++++++++++++++++ docs/index.txt | 240 ++++++++++++++++++ docs/make.bat | 170 +++++++++++++ 8 files changed, 1006 insertions(+), 228 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/_theme/compressor/static/compressor.css_t create mode 100644 docs/_theme/compressor/theme.conf create mode 100644 docs/conf.py create mode 100644 docs/index.txt create mode 100644 docs/make.bat diff --git a/.gitignore b/.gitignore index 439d13c..57a9134 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ MANIFEST *.pyc *.egg-info .tox/ -*.egg \ No newline at end of file +*.egg +docs/_build/ \ No newline at end of file diff --git a/README.rst b/README.rst index dd22789..7958f74 100644 --- a/README.rst +++ b/README.rst @@ -1,233 +1,13 @@ Django compressor -================= +================== Compresses linked and inline javascript or CSS into a single cached file. -Syntax:: +The main website for django-compressor is +`github.com/jezdez/django_compressor`_ where you can also file tickets. - {% load compress %} - {% compress %} - - {% endcompress %} +You can also install the `in-development version`_ of django-compressor with +``pip install django_compressor==dev`` or ``easy_install django_compressor==dev``. -Examples:: - - {% load compress %} - {% compress css %} - - - - {% endcompress %} - -Which would be rendered something like:: - - - -or:: - - {% load compress %} - {% compress js %} - - - {% endcompress %} - -Which would be rendered something like:: - - - -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. - -If COMPRESS is False (defaults to the opposite of DEBUG) the compress tag -simply returns exactly what it was given, to ease development. - -.. note:: - - For production sites it is advisable to use a real cache backend such as - memcached to speed up the checks of compressed files. Make sure you set - your Django cache backend appropriately. - - -CSS Notes: -********** - -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. - -Stylesheets that are @import'd are not compressed into the main file. They are -left alone. - -If the media attribute is set on + + {% endcompress %} + +Which would be rendered something like: + +.. code-block:: html + + + +or: + +.. code-block:: django + + {% load compress %} + {% compress js %} + + + {% endcompress %} + +Which would be rendered something like: + +.. code-block:: html + + + +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. + +If COMPRESS is False (defaults to the opposite of DEBUG) the compress tag +simply returns exactly what it was given, to ease development. + +.. note:: + + For production sites it is advisable to use a real cache backend such as + memcached to speed up the checks of compressed files. Make sure you set + your Django cache backend appropriately. + + +CSS Notes: +********** + +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. + +Stylesheets that are ``@import``'d are not compressed into the main file. +They are left alone. + +If the media attribute is set on