{ "info": { "author": "James Maddox", "author_email": "jhmaddox@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "django-precompressed\n====================\n\nprecompressed is a pluggable application for Django developers who want to serve precompressed (gzipped) static files.\n\nAbout\n=====\n\n+ Alters the behavior of `./manage.py collectstatic` to save gzipped copies of specified static files (by default `*.css` and `*.js`).\n+ When the client supports `Content-Encoding: gzip` and `{% static %}` is used then the rendered URI will refer to the precompressed version of the static file.\n+ Works with [CachedFilesMixin](https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#cachedstaticfilesstorage) and [storages.backends.s3boto.S3BotoStorage](http://django-storages.readthedocs.org/)\n\nInstallation\n============\n\n1. `pip install django-precompressed`\n2. Add `precompressed` to your `settings.INSTALLED_APPS` before `'django.contrib.staticfiles'` so that precompressed's version of `{% static %}` will be utilized.\n3. Set `settings.STATICFILES_STORAGE` to one that suits your needs (see Storages below).\n4. Run `./manage.py collectstatic` to generate precompressed copies.\n5. Utilize `{% static %}` template tag when referencing static files where applicable.\n\nConfiguration\n=============\n\nAll settings are optional and specified via the `settings.PRECOMPRESSED_SETTINGS` dictionary.\n\n+ `GZIP_PATTERNS` is a tuple of file patterns that are to be gzipped. Defaults to `('*.css', '*.js')`\n+ `DEFAULT_COMPRESS_LEVEL` is a number 0-9 that specifies the default compression level. Defaults to 9.\n+ `accepts_gzip(request)` is a function that returns True if the client supports `Content-Encoding: gzip`\n+ `get_gzipped_name(name)` is a function that translates filenames and URIs to the precompressed version. Defaults to resource.ext becomes resource.gz.ext\n+ `should_save_gzipped_copy(path)` is a function that returns True if the specified file should have a precompressed copy saved. Defaults to file matches GZIP_PATTERNS?\n\nStorages\n========\n\n precompressed.storage.PrecompressedStaticFilesStorage\n precompressed.storage.CachedPrecompressedStaticFilesStorage\n \nThese storages extend Django's builtin StaticFilesStorage to provide the described precompression behavior. If you use this you'll probably want to configure your webserver to add the `Content-Encoding: gzip` header when serving precompressed files.\n\n precompressed.storage.s3boto.PrecompressedS3BotoStorage\n precompressed.storage.s3boto.CachedPrecompressedS3BotoStorage\n\nThese storages extend [django-storages' S3BotoStorage](http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html) to provide described precompression behavior for files stored on [Amazon Simple Storage Service (Amazon S3)](http://aws.amazon.com/s3/)\n\nThe Cached prefixed versions of each utilize [CachedFilesMixin](https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#cachedstaticfilesstorage) and therefore store hashed copies of static files in addition to the precompressed versions.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jhmaddox/django-precompressed/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-precompressed", "package_url": "https://pypi.org/project/django-precompressed/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-precompressed/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jhmaddox/django-precompressed/" }, "release_url": "https://pypi.org/project/django-precompressed/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "precompressed is a pluggable application for Django developers who want to serve precompressed (gzipped) static files.", "version": "0.0.2" }, "last_serial": 790328, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f4c102e056d869bca81f20a6d4e4d462", "sha256": "f871c4e8ded39475930883bb09fe6fe9c8df34cd0f9ad2771a238b161d62353f" }, "downloads": -1, "filename": "django-precompressed-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f4c102e056d869bca81f20a6d4e4d462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6806, "upload_time": "2012-12-20T00:11:44", "url": "https://files.pythonhosted.org/packages/a6/18/2577beb4cb2e004dc399c3523f1ceee69cdf7c1c587fd50af4e091c16d2b/django-precompressed-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "be25f2d5fb6fc56d8ebd718948381804", "sha256": "e0d0f021765d4d87c7a8eefe5611b1d7ec9731ecc361ef4baa62ec68fe50bad1" }, "downloads": -1, "filename": "django-precompressed-0.0.2.tar.gz", "has_sig": false, "md5_digest": "be25f2d5fb6fc56d8ebd718948381804", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6857, "upload_time": "2013-02-26T01:26:51", "url": "https://files.pythonhosted.org/packages/c6/36/aa7aa4891c9af1b11ad082eb0b1d0f130cb6e61150c4d0bd4f68cadbbfa3/django-precompressed-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be25f2d5fb6fc56d8ebd718948381804", "sha256": "e0d0f021765d4d87c7a8eefe5611b1d7ec9731ecc361ef4baa62ec68fe50bad1" }, "downloads": -1, "filename": "django-precompressed-0.0.2.tar.gz", "has_sig": false, "md5_digest": "be25f2d5fb6fc56d8ebd718948381804", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6857, "upload_time": "2013-02-26T01:26:51", "url": "https://files.pythonhosted.org/packages/c6/36/aa7aa4891c9af1b11ad082eb0b1d0f130cb6e61150c4d0bd4f68cadbbfa3/django-precompressed-0.0.2.tar.gz" } ] }