{ "info": { "author": "John Millikin", "author_email": "jmillikin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ":Author: John Millikin\n:Copyright: This document has been placed in the public domain.\n\nOverview\n========\n\n``django-resourcetags`` is a set of utility functions and tags for Django.\nIt simplfies inclusion of static resources into a page, by providing\nauto-versioning and transparent compression handling.\n\nUsage\n=====\n\nInclude ``django_resourcetags`` in your ``INSTALLED_APPS`` setting. Load\nthe tag library with ``{% load resources %}``, and then use the\n``resource``, ``resource_group``, or ``resource_url`` tags.\n\n``resource_url``\n----------------\n\nUsed like ``{% resource_url \"/myapp/somefile.txt\" %}``. Will calculate\nthe mtime of the resource and include it in the URL, to implement\nauto-versioned resources. The final URL will be of the form::\n\n {{MEDIA_URL}}/{{file_mtime}}/myapp/somefile.txt\n\nWhen finding the mtime, file paths are relative to ``MEDIA_ROOT``. If the\nfile cannot be found, an mtime of 0 will be used.\n\n``resource``\n------------\n\nUsed like ``{% resource \"/myapp/somefile.txt\" %}``. Autodetects the\nMIME-type of the resource and wraps the URL in an appropriate HTML tag.\nDefault handlers exist for CSS, JavaScript, PNG, JPEG, and GIF. Additional\nhandlers may be registered in the ``RESOURCE_HANDLERS`` setting, with this\nformat::\n\n RESOURCE_HANDLERS = {'text/css': 'myproject.myapp.resource_handlers.css'}\n\n``resource_group``\n------------------\n\nUsed like ``{% resource_group \"mygroup\" %}``. Groups may be defined in\nthe settings file to reduce duplicated typing and facilitate compression\n(see below). Resource groups are defined in the format::\n\n RESOURCE_GROUPS = {'mygroup': ('file1.css','file2.css')}\n\nIn non-compressed mode, each file will be included in a separate tag.\n\nCompression\n===========\n\nResources and resource groups may be compressed using the command\n``manage.py compressresources``. Resource groups will be concatenated\ntogether into one file, and run through a compression filter. Single\nresources may also be run through the compression filter by listing\nthem in the ``COMPRESS_EXTRA`` setting.\n\nCompression filters are functions listed in the ``RESOURCE_COMPRESSION_FILTERS``\nsetting, which is a mapping of MIME-type -> [function names]. Compression\nfunctions are called in sequence.\n\nCompressed resources are stored in the directory specified by\n``COMPRESSED_MEDIA_ROOT``, and served from the URL ``COMPRESSED_MEDIA_URL``.\n\nCompression filters for CSS and JavaScript are included in the\n``django_resourcetags.compression.filters`` module, under the names\n``filters.javascript`` and ``filters.css``.\n\nGenshi Integration\n==================\n\nFor use with ``django-genshi``. Include ``django_resourcetags.genshi_integration.template_context``\nin your ``TEMPLATE_CONTEXT_PROCESSORS`` setting, and you will have access\nto the functions ``resource()``, ``resource_group()``, and ``resource_url()``.\nThese functions work just like the template tag equivalents.", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/django-resourcetags/1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://launchpad.net/django-resourcetags", "keywords": "django", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "django-resourcetags", "package_url": "https://pypi.org/project/django-resourcetags/", "platform": "Platform Independent", "project_url": "https://pypi.org/project/django-resourcetags/", "project_urls": { "Download": "http://pypi.python.org/pypi/django-resourcetags/1.1", "Homepage": "https://launchpad.net/django-resourcetags" }, "release_url": "https://pypi.org/project/django-resourcetags/1.1/", "requires_dist": null, "requires_python": null, "summary": "Django template tags for referencing static files", "version": "1.1" }, "last_serial": 70882, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c560b4acccae4f981d6736aa124c11b5", "sha256": "5479c8f7056c7228b50897a651a3cd186b233b87ce5e33b84b62f82fb4572620" }, "downloads": -1, "filename": "django-resourcetags-1.0.0.tar.gz", "has_sig": true, "md5_digest": "c560b4acccae4f981d6736aa124c11b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11520, "upload_time": "2008-10-01T02:15:51", "url": "https://files.pythonhosted.org/packages/84/99/048793225a4fa6c8ad1d5416ed903b1c5753e72fb836ae6085a0f218a020/django-resourcetags-1.0.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "138e99134d44e234230ecb7463f0e8ee", "sha256": "ede7d8646e3b034277a518b68d3c6b78fd90b7b11a77d5c4e0c2361522fce311" }, "downloads": -1, "filename": "django-resourcetags-1.1.tar.gz", "has_sig": true, "md5_digest": "138e99134d44e234230ecb7463f0e8ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12027, "upload_time": "2009-04-19T01:08:08", "url": "https://files.pythonhosted.org/packages/2e/dc/f2bbe823d183b6dfddd97cc7b275f413fd3bd075a0c78b8c66a5a8e96670/django-resourcetags-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "138e99134d44e234230ecb7463f0e8ee", "sha256": "ede7d8646e3b034277a518b68d3c6b78fd90b7b11a77d5c4e0c2361522fce311" }, "downloads": -1, "filename": "django-resourcetags-1.1.tar.gz", "has_sig": true, "md5_digest": "138e99134d44e234230ecb7463f0e8ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12027, "upload_time": "2009-04-19T01:08:08", "url": "https://files.pythonhosted.org/packages/2e/dc/f2bbe823d183b6dfddd97cc7b275f413fd3bd075a0c78b8c66a5a8e96670/django-resourcetags-1.1.tar.gz" } ] }