{ "info": { "author": "Jim Washington and contributors", "author_email": "jwashin@users.sourceforge.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Buildout", "Framework :: Zope3", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "****************\r\nzif.headincludes\r\n****************\r\n\r\nSee 'src/zif/headincludes/README.txt' for more information.\r\n\r\n\r\nReleases\r\n********\r\n================\r\n0.4 (2010/03/12)\r\n================\r\n\r\nAdded test and buildout configuration.\r\nProperly does requirements-of-requirements now.\r\nMany thanks to an anonymous contributor.\r\n\r\n================\r\n0.3 (2007/05/25)\r\n================\r\n\r\nRelease to include zcml files that were missing from distribution.\r\n\r\n\r\n================\r\n0.2 (2007/04/13)\r\n================\r\n\r\nCorrect releases README.\r\n\r\n\r\n================\r\n0.1 (2007/04/13)\r\n================\r\n\r\nInitial release.\r\n\r\n\r\nDetailed Documentation\r\n**********************\r\n\r\n================\r\nzif.headincludes\r\n================\r\n\r\nThis is a wsgi middleware application intended for use with\r\npaste.deploy, zope.paste, and zope3.\r\n\r\nIt serves as a wsgi filter to create on-the-fly < script> and\r\n<style> tags inside the <head> of HTML documents. It was designed\r\nfor output from a Zope3 application, but the wsgi filter itself, in\r\nheadincluder.py, has no Zope3 dependencies.\r\n\r\nThe idea is that subobjects of a document may separately need special\r\nresources, but it is difficult to know whether a resource is asked for\r\nmultiple times when documents are dynamically generated. For Zope3,\r\nheadincludes replaces the functionality of zc.resourcelibrary, which\r\nalso implements this idea. In fact, mostly because headincludes\r\n\"borrows\" code from zc.resourcelibrary, they may be installed\r\nside-by-side, but only one can be used at a time, because they both\r\nimplement <zope:resourceLibrary> tags for zcml and the\r\n<tal:resource_library> statement for PageTemplates.\r\n\r\nheadincludes works by creating a key in the wsgi environment,\r\n'wsgi.html.head.includes' that is a list of urls that need to be\r\nreferenced in the head of the HTML document for the current request. \r\nThe application registers a need for the reference by appending the url\r\nfor the reference to the list. Urls that end in \".css\" and \".js\" in\r\nthat list trigger the middleware to insert <style> or <script>\r\ntags into the <head> of the document after the application is done\r\ncreating the HTML.\r\n\r\nheadincludes tries to maintain as much compatibility as possible with\r\nzc.resourcelibrary. The need() function has been rewritten, and using\r\nthe headincludes version will be a simple matter of changing the import\r\nstatement. The <tal:resource_library> statement is also still\r\nfunctional.\r\n\r\nOne new thing headincludes allows is arbitrary includes without needing\r\nto register the resource. urls can be placed in the includes list at\r\nany time that request.environ can be accessed. Just append any desired\r\nurl to the list, e.g.,\r\n\r\n::\r\n\r\n try:\r\n request.environ['wsgi.html.head.includes'].append('/scripts/my_url.js')\r\n except KeyError:\r\n (handle case when the filter is not available)\r\n\r\nAlternatively, headincludes has a utility that provides IHeadIncludeRegistration:\r\n\r\n::\r\n\r\n from zope.component import getUtility\r\n from zif.headincludes.interfaces import IHeadIncludeRegistration\r\n registrar = getUtility(IHeadIncludeRegistration)\r\n if registrar:\r\n registrar.register('scripts/my_url.js')\r\n\r\n\r\nDependencies\r\n------------\r\n\r\nFor zope3, headincludes requires Sidnei da Silva's zope.paste\r\n\r\nzope.paste is available at http://svn.zope.org/zope.paste/trunk/\r\n\r\n::\r\n\r\n cd [path.to.zope3.src.directory]/zope\r\n svn co http://svn.zope.org/zope.paste/trunk/ paste\r\n\r\nInstructions for zope.paste are at http://awkly.org/\r\n\r\nzope.paste requires paste.deploy. paste.deploy can be obtained from the cheese\r\nshop. Presuming you have setuptools installed,\r\n\r\n::\r\n\r\n sudo easy_install.py PasteDeploy\r\n\r\nThis (headincludes) package can be unzipped and installed anywhere on the Python\r\npath.\r\n\r\n\r\nSetup\r\n-----\r\n\r\nFollow Sidnei's instructions for setting up zope.paste. It involves\r\nputting the usual zope.paste-configure.zcml file in [zope3 instance]/etc/site-packages.\r\nThere is also a parameter to change in [zope3 instance]/etc/zope.conf. \r\nThe new twist is a paste.ini file in [zope3 instance]/etc\r\n\r\nFor Zope3, copy the headincludes-configure.zcml and\r\nheadincludes-meta.zcml files into [zope3 instance]/etc/package-includes\r\ndirectory.\r\n\r\nAn example paste.ini file looks like:\r\n\r\n::\r\n\r\n [pipeline:Paste.Main]\r\n pipeline = headincludes main\r\n\r\n [app:main]\r\n paste.app_factory = zope.paste.application:zope_publisher_app_factory\r\n\r\n\r\n [filter:headincludes]\r\n paste.filter_factory=zif.headincludes.headincluder:filter_factory\r\n location=top\r\n\r\n\r\nConfiguration\r\n-------------\r\n\r\nThe paste.ini file above shows an example of the configuration option for\r\nheadincludes\r\n\r\n- **location** is where in the <head> you want the new tags. \"top\" is the\r\n default, and places the new script and/or style tags just after the <head>\r\n element. Any other value will place the tags just before the </head> tag.\r\n\r\nDownload\r\n**********************", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://zif.svn.sourceforge.net/viewvc/zif/zif.headincludes", "keywords": "headincludes wsgi middleware zope3", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "zif.headincludes", "package_url": "https://pypi.org/project/zif.headincludes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zif.headincludes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://zif.svn.sourceforge.net/viewvc/zif/zif.headincludes" }, "release_url": "https://pypi.org/project/zif.headincludes/0.4/", "requires_dist": null, "requires_python": null, "summary": "WSGI middleware to manipulate css and javascript in the HTML header.", "version": "0.4" }, "last_serial": 802286, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "4936fc1733bb408eaff9a2ca6b2b4ccb", "sha256": "87b1894e582c76eb804357d8ee1b09b9f196080eb4b1db64d85d3001b4d1aecb" }, "downloads": -1, "filename": "zif.headincludes-0.2-py2.4.egg", "has_sig": false, "md5_digest": "4936fc1733bb408eaff9a2ca6b2b4ccb", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 24020, "upload_time": "2007-04-13T23:43:09", "url": "https://files.pythonhosted.org/packages/8a/dc/5feadd333fcaa22bd87a59f38f75fd7dbef561807d0719cfe1e285e5d3e0/zif.headincludes-0.2-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "0d38840f8eed4e24e0718516dea10428", "sha256": "0057e36b98967062ebb43d8893446d14722c1dcaae25f318ecf62228f51f1341" }, "downloads": -1, "filename": "zif.headincludes-0.2.tar.gz", "has_sig": false, "md5_digest": "0d38840f8eed4e24e0718516dea10428", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10919, "upload_time": "2007-04-13T23:43:09", "url": "https://files.pythonhosted.org/packages/1c/8b/8d618d1ca3f094d732230715c2db48c319976443879313185a82fe845243/zif.headincludes-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "e5e925d461b1204097327e835782bfae", "sha256": "65485027066fb5b66c840432b6ed5fafc81e88d65254f740670cabe77c517acb" }, "downloads": -1, "filename": "zif.headincludes-0.3-py2.4.egg", "has_sig": false, "md5_digest": "e5e925d461b1204097327e835782bfae", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 28614, "upload_time": "2007-05-25T23:55:39", "url": "https://files.pythonhosted.org/packages/26/5b/aa47fa6ea49da84e9d8b62a1e62e8043f8f3e97d39240e178c0b7d0fed06/zif.headincludes-0.3-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "c3028ce45fb49dbaaa522a31023def04", "sha256": "f6c2ee9b59654207d832e326e3842d8fc9905882935658f5d384e827625bbe89" }, "downloads": -1, "filename": "zif.headincludes-0.3.tar.gz", "has_sig": false, "md5_digest": "c3028ce45fb49dbaaa522a31023def04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12871, "upload_time": "2007-05-25T23:55:41", "url": "https://files.pythonhosted.org/packages/47/5c/b2595539dcacaed9664b20c142b87d35be402d134305b61edbcbc08dadc7/zif.headincludes-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "513cccf4bcd69490792d4596ee428f3e", "sha256": "7a62285c7442a34984ee0a6e9836e53aca91876b9059d165ecaf1a6465e6611f" }, "downloads": -1, "filename": "zif.headincludes-0.4-py2.5.egg", "has_sig": false, "md5_digest": "513cccf4bcd69490792d4596ee428f3e", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 30331, "upload_time": "2010-03-12T17:13:53", "url": "https://files.pythonhosted.org/packages/b6/c8/3ebb3b4e8ab6264769d0da9a28ed11ccb4a0257a46e266a7a57e467e674d/zif.headincludes-0.4-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "ca5d672eb073c22ddee6b75849a2ad9d", "sha256": "cb31828f3d805ecf5f7a75ec49b7beea3e543862e04632bc010bee11af1f36e8" }, "downloads": -1, "filename": "zif.headincludes-0.4.tar.gz", "has_sig": false, "md5_digest": "ca5d672eb073c22ddee6b75849a2ad9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12500, "upload_time": "2010-03-12T17:13:54", "url": "https://files.pythonhosted.org/packages/eb/b6/2a6e31cfe1d67bddf8864cf1813864e6c681631c05aa7d2b2d8a883e1a81/zif.headincludes-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "513cccf4bcd69490792d4596ee428f3e", "sha256": "7a62285c7442a34984ee0a6e9836e53aca91876b9059d165ecaf1a6465e6611f" }, "downloads": -1, "filename": "zif.headincludes-0.4-py2.5.egg", "has_sig": false, "md5_digest": "513cccf4bcd69490792d4596ee428f3e", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 30331, "upload_time": "2010-03-12T17:13:53", "url": "https://files.pythonhosted.org/packages/b6/c8/3ebb3b4e8ab6264769d0da9a28ed11ccb4a0257a46e266a7a57e467e674d/zif.headincludes-0.4-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "ca5d672eb073c22ddee6b75849a2ad9d", "sha256": "cb31828f3d805ecf5f7a75ec49b7beea3e543862e04632bc010bee11af1f36e8" }, "downloads": -1, "filename": "zif.headincludes-0.4.tar.gz", "has_sig": false, "md5_digest": "ca5d672eb073c22ddee6b75849a2ad9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12500, "upload_time": "2010-03-12T17:13:54", "url": "https://files.pythonhosted.org/packages/eb/b6/2a6e31cfe1d67bddf8864cf1813864e6c681631c05aa7d2b2d8a883e1a81/zif.headincludes-0.4.tar.gz" } ] }