{ "info": { "author": "kamagatos", "author_email": "kamagatos@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "django-compresshtml\n=====================\n\n\nHTML compressor for django\n\nWhy compress HTML code?\n=====================\n\nWhen compressed HTML code, you reduce the size of data transferred from your server to your client, and your pages load faster.\n\nInstalling\n==========\n\nFor install django-compresshtml, run on terminal: ::\n\n $ [sudo] pip install django-compresshtml\n\nUsing the midleware\n===================\n\nAll you need to do is add ``compresshtml.middleware.CompressHtmlMiddleware`` to your ``MIDDLEWARE_CLASSES`` and enable the ``COMPRESS_HTML`` setting:\n\n MIDDLEWARE_CLASSES = (\n 'compresshtml.middleware.CompressHtmlMiddleware',\n # other middleware classes \n )\n\n COMPRESS_HTML = True\n\nThis middleware should be placed before any other middleware that need to read or write the response body so that compression happens afterward.\n\nThe default value for the ``COMPRESS_HTML`` setting is ``not DEBUG``. You only need to set it to ``True`` if you want to minify your HTML code when ``DEBUG`` is enabled.\n\nKeeping comments\n----------------\n\nThe default behaviour of the middleware is remove all comments but conditional comments from HTML. If you want to keep your comments, set the setting ``KEEP_COMMENTS_ON_COMPRESSING`` to ``True``:\n\n KEEP_COMMENTS_ON_COMPRESSING = True\n\nUsing the decorator\n===================\n\ndjango-compresshtml also provides a decorator, that you can use only on views you want to minify the response:\n\n from compresshtml.decorators import compressed_response\n\n @compressed_response\n def home(request):\n return render_to_response('home.html')\n\ndevelopment\n===========\n\n* Source hosted at `GitHub `\n* Report issues on `GitHub Issues `\n\nPull requests are very welcomed!\n\nChangelog\n=========\n\n0.1\n-----\n\n* Initial commit\n\nLICENSE\n=======\n\nUnless otherwise noted, the django-compresshtml source files are distributed under the BSD-style license found in the LICENSE file.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-compresshtml", "package_url": "https://pypi.org/project/django-compresshtml/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-compresshtml/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/django-compresshtml/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "HTML compressor for django", "version": "0.1.1" }, "last_serial": 789348, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "90115c2122e03a01ea8524dc2f7cba67", "sha256": "0611dbfdccaae104435b06ae519a7055aec8ad653211ac9f52fb778fd46b0294" }, "downloads": -1, "filename": "django-compresshtml-0.1.1.tar.gz", "has_sig": false, "md5_digest": "90115c2122e03a01ea8524dc2f7cba67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2743, "upload_time": "2012-10-29T04:37:17", "url": "https://files.pythonhosted.org/packages/18/32/060f649a157e32f5915c63934e4bc079dc86d97f5b664d4bc8d0f6c65c42/django-compresshtml-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "90115c2122e03a01ea8524dc2f7cba67", "sha256": "0611dbfdccaae104435b06ae519a7055aec8ad653211ac9f52fb778fd46b0294" }, "downloads": -1, "filename": "django-compresshtml-0.1.1.tar.gz", "has_sig": false, "md5_digest": "90115c2122e03a01ea8524dc2f7cba67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2743, "upload_time": "2012-10-29T04:37:17", "url": "https://files.pythonhosted.org/packages/18/32/060f649a157e32f5915c63934e4bc079dc86d97f5b664d4bc8d0f6c65c42/django-compresshtml-0.1.1.tar.gz" } ] }