{ "info": { "author": "Tim Heap", "author_email": "tim@timheap.me", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-template-media\n=======================\n\nThis module allows template writers to manipulate form media in templates.\nThis allows multiple forms on a page to share scripts with out including them twice.\n\nAll of the media included in the page using these tools\nare collected into a single 'global'[1]_ ``Media`` instance for that page.\nAll operations are performed on this 'global'[1]_ ``Media`` instance.\n\nInstalling\n==========\n\nInstall this package, using pip::\n\n $ pip install django-template-media\n\nAdd it to your ``INSTALLED_APPS`` and ``TEMPLATE_CONTEXT_PROCESSORS``::\n\n INSTALLED_APPS += (\n 'django_template_media',\n )\n\n TEMPLATE_CONTEXT_PROCESSORS += (\n 'django_template_media.context_processors.template_media',\n )\n\nLoad the template tags in your templates by loading the ``media_tags`` library::\n\n {% load media_tags %}\n\nUsing\n=====\n\nThe tools are designed to work with the template heirarchy in a sane manner.\nThe examples will assume a ``site.html`` base template that defines a block named ``media``,\nand two ``{% print_media %}`` tags to print the accumulated media files::\n\n \n \n
\n