{ "info": { "author": "Pradeep Khileri", "author_email": "pradeepchoudhary009@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-img-cache\n> A quick hack for faster image caching at back-end for progressive image loading on django website.\n\n## Features\n* supports image resizing for all formats \n* faster image caching at backend on redis/memcached db\n* saving your CDN cost ;)\n* Tested on django >=1.10\n\n## Installation\n```shell\npip install django-img-cache\n```\n\n## Usage\n### Project Setting\n* After installation, register the app in INSTALLED_APPS section of your project settings.\n```\nINSTALLED_APPS = (\n 'blog',\n 'news',\n 'all_auth',\n\n 'img_cache',\n)\n```\n### Default Settings for app\n* These are default `settings`, you can overwrite them in Project `settings` as per requirement.\n```\nIMGCACHE_DEFAULT_STYLE='width:100%' # used in imgcache and imgcache_src\nIMGCACHE_DEFAULT_CLASS='img-responsive'\nIMGCACHE_DEFAULT_Q='10' # default resizing percent\nIMGCACHE_TMP_DIR='img-cache' # full path will be /tmp/img-cache\nIMGCACHE_KEY_PREFIX='django-img-cache' # cache key prefix\nIMGCACHE_DEFAULT_CONTENT_CLASS='img-blur' # used in imgcache_content\nIMGCACHE_DEFAULT_CONTENT_STYLE='width:100%' # used in imgcache_content\n```\n* Resizing Percent `Q or q` Explaination:\n```\nintial image of width(W) and height(H) after resizing to Q percent say 20\nfinal image will be of 0.2W and 0.2H, keeping aspect ratio same.\n```\n* You can also pass required width and height in pixels instead of resizing percentage. \n### Template Usage\n* first load the template tag:\n```\n{% load imgcache %}\n```\n* there are `imgcache` tag and two filter tag `imgcache_src` and `imgcache_content`\n```html\n\n{% load imgcache %}\n\n \n {% imgcache blog.image.url q=\"10\" as img %}\n {{img | safe}} \n {% endimgcache %}\n

Description

\n \n

This is blog contents....

\n \n {{blog.content | imgcache_content | safe}}\n\n \n \n\n\n\n```\n* There will be initially slow loading of page because it will take sometime to download and cache all those images, on successive loading it will be blazing fast.\n\n* Screenshot of Redis-DB afer page loading:\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://prdpx7.github.io/", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-img-cache", "package_url": "https://pypi.org/project/django-img-cache/", "platform": "", "project_url": "https://pypi.org/project/django-img-cache/", "project_urls": { "Homepage": "https://prdpx7.github.io/" }, "release_url": "https://pypi.org/project/django-img-cache/0.2/", "requires_dist": null, "requires_python": "", "summary": "A simple django app for faster image caching", "version": "0.2" }, "last_serial": 4253912, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "141173669153195da2a335b9c7444a04", "sha256": "5e5f5333cd3c4365f9c53b8488b46303a5a1de5010005d658f79ed158112cb5f" }, "downloads": -1, "filename": "django-img-cache-0.1.tar.gz", "has_sig": false, "md5_digest": "141173669153195da2a335b9c7444a04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6620, "upload_time": "2018-06-03T18:46:55", "url": "https://files.pythonhosted.org/packages/7d/f2/92305ec55c6c798340b9131d52713596404ac842064eecc34fbb4f1a090c/django-img-cache-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ee73c1cb84dfb1a7e8bf1dd0ea1d498a", "sha256": "2d5fe71b454d8f4249d605c42c944078dd97d7316bf4e261a0b9499cd867d384" }, "downloads": -1, "filename": "django-img-cache-0.2.tar.gz", "has_sig": false, "md5_digest": "ee73c1cb84dfb1a7e8bf1dd0ea1d498a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6653, "upload_time": "2018-09-09T16:00:26", "url": "https://files.pythonhosted.org/packages/91/f5/d7a16f61d0e54e79a56213bca6b3af8052dcf5e0654ca883456404b905c6/django-img-cache-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee73c1cb84dfb1a7e8bf1dd0ea1d498a", "sha256": "2d5fe71b454d8f4249d605c42c944078dd97d7316bf4e261a0b9499cd867d384" }, "downloads": -1, "filename": "django-img-cache-0.2.tar.gz", "has_sig": false, "md5_digest": "ee73c1cb84dfb1a7e8bf1dd0ea1d498a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6653, "upload_time": "2018-09-09T16:00:26", "url": "https://files.pythonhosted.org/packages/91/f5/d7a16f61d0e54e79a56213bca6b3af8052dcf5e0654ca883456404b905c6/django-img-cache-0.2.tar.gz" } ] }