{ "info": { "author": "Robin Harms Oredsson", "author_email": "robin@betahaus.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "Deform Autoneed README\n======================\n\nA simple package to turn any `deform `_\nrequirements into `Fanstatic `_ resources and serve them.\n\nSome ideas were taken from `js.deform `_,\nbut this package is in many ways its absolute opposite: It only serves whatever content\ndeform ships with. Hence it should be compatible with any version of deform.\n\n.. note::\n\n Note: This package patches deforms render function the same way as js.deform does.\n If you don't want that, you can include the rendering yourself.\n\n.. image:: https://travis-ci.org/robinharms/deform_autoneed.svg?branch=master\n :target: https://travis-ci.org/robinharms/deform_autoneed\n\nTested with the following deform/Python versions:\n - Python 2.7, 3.3, 3.6\n - deform 0.9.9\n - deform 2.0a.2\n - deform 2.0.3\n\nIt should be compatible with most fanstatic versions,\nincluding current stable 0.16 and future 1.0x.\n\nThis package should also work with future versions of deform that are somewhat API-stable.\nShould be framework agnostic and compatible with anything that Fanstatic works on. (Any WSGI)\n\n\nSimple usage\n------------\n\nDuring startup procedure of your app, simply run:\n\n.. code-block:: python\n\n from deform_autoneed import includeme\n includeme()\n\nOr if you use the Pyramid framework:\n\n.. code-block:: python\n\n config.include('deform_autoneed')\n\nThis will populate the local registry with any resources that deform widgets might need,\nand patch deforms render function so they're included automatically.\n\nAnd that's it!\n\n\nUsing registered resources in other pages\n-----------------------------------------\n\ndeform prior to 2 depends on jquery, while deform 2 depends on jquery and bootstrap.\nIf you want any of these base packages in any other view that isn't a form, simply:\n\n.. code-block:: python\n\n from deform_autoneed import need_lib\n \n need_lib('basic')\n\nBasic means any base requirements of deform itself. You may also call other deform dependencies here.\nEssentially, you can use any key from deforms default resource registry in: ``deform.widget.default_resources``.\n\n\nReplacing a resource requirement\n--------------------------------\n\nIf you wish to replace a resource with something else, ``ResourceRegistry``\nhas a method for that. It will have an effect on everything that might\ndepend on that resource.\n\nExample:\n\ndeforms form.css is a registered requirement. We'll replace it with out own css,\nwhere ``our_css`` is a fanstatic resource object.\n\nresource_registry.replace_resource('deform:static/css/form.css', our_css)\n\nNote that ``replace_resource`` accepts either fanstatic.Resource``-objects\nor paths with package name, like 'deform:static/css/form.css' as arguments.\n\n\nRegistering a custom widgets resources\n--------------------------------------\n\nIf you're using any widgets/forms in deform that require non-standard plugins,\nyou can register them within this package to include them.\n\nFirst, create a Fanstatic library for your resources and an entry point in your setup.py.\n(See the Fanstatic docs for this)\n\n.. code-block:: python\n\n from fanstatic import Library\n \n my_lib = Library('my_lib', 'my/static')\n\nAdd your library to autoneed's registry:\n\n.. code-block:: python\n\n from deform_autoneed import resource_registry\n \n resource_registry.libraries['my_package_name'] = my_lib\n\nIf you have structured your requirements the same way as in ``deform.widget.default_resources``,\nand your directory for static resources is called ``static``,\nyou can call the method populate from resources to automatically create your package.\n\n.. code-block:: python\n\n resource_registry.populate_from_resources(your_resources)\n\nIf not, you can simply add the requirements using the method ``create_requirement_for``.\n\n.. code-block:: python\n\n resource_registry.create_requirement_for('my_special_widget',\n ['my_package_name:my/static/css/cute.css', 'my_package_name:my/static/js/annoying.js'],\n )\n\nIn other words, this example had the directory layout, where the static directory\nis the base of your fanstatic library.\n\n* my_package_name/\n\n * my/\n\n * static/\n\n * css/\n * js/\n\nAnd the custom widget will require something called 'my_special_widget'.\n(See the deform docs on custom widgets)\n\nAfter this, your dependencies will be included automatically whenever deform needs them.\n\n\nBugs, contact etc...\n--------------------\n\n* Source/bug tracker: `GitHub `_\n* Initial author and maintainer: Robin Harms Oredsson ``_\n* License: GPLv3 or later\n\n\n\nChangelog\n=========\n\n0.2.3b (2017-02-08)\n-------------------\n\n- Fixes for Windows paths. While windows isn't tested and maintained, it should work now. [sassur]\n\n\n0.2.2b (2014-04-08)\n-------------------\n\n- Resource dependencies consider the order deform list them.\n A widget requirement with several listed resources will have them depend on each other in order.\n\n0.2.1b (2014-04-08)\n-------------------\n\n- NOTE: ``remove_resources`` changed to ``remove_resource`` - it only accepts\n one resource now.\n- Replacing resources may require to replace dependencies as well.\n This is now the default option for ``replace_resource`` and ``remove_resource``.\n\n0.2b (2014-03-25)\n-----------------\n\n- New methods to interact and replace resources.\n- ``ResourceRegistry`` objects now keep track of ``fanstatic.Resources`` in ``ResourceRegistry.requirements``,\n rather than file paths.\n- ``create_requirement_for`` now figures out proper paths from fanstatic libraries, so just specify proper\n package paths like: ``package_name:some/dir/with/file.js``.\n\n\n0.1b (2014-03-21)\n-----------------\n\n- Initial version", "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/robinharms/deform_autoneed", "keywords": "web colander deform fanstatic", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "deform_autoneed", "package_url": "https://pypi.org/project/deform_autoneed/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/deform_autoneed/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/robinharms/deform_autoneed" }, "release_url": "https://pypi.org/project/deform_autoneed/0.2.3b0/", "requires_dist": null, "requires_python": null, "summary": "Auto include resources in deform via Fanstatic.", "version": "0.2.3b0" }, "last_serial": 2628167, "releases": { "0.1b": [ { "comment_text": "", "digests": { "md5": "bff3e41bedd6e9f77db18aedeeae5420", "sha256": "7cea9e4be3790859a39710fb991778e68610ebfadb91ed1d5f5842bc48decbf3" }, "downloads": -1, "filename": "deform_autoneed-0.1b.tar.gz", "has_sig": false, "md5_digest": "bff3e41bedd6e9f77db18aedeeae5420", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6910, "upload_time": "2014-03-21T16:57:49", "url": "https://files.pythonhosted.org/packages/91/d7/87b1c0001838dfadae96186c5a862ace886a0c7b57abce1bc41f13dfc1a7/deform_autoneed-0.1b.tar.gz" } ], "0.2.1b": [ { "comment_text": "", "digests": { "md5": "e33aa4aa41847f48f727a0207834209c", "sha256": "630a5279998dc9b8773f5cc32cfdfdcfbde5f0d04c31f4e502a609f51553f6a7" }, "downloads": -1, "filename": "deform_autoneed-0.2.1b.tar.gz", "has_sig": false, "md5_digest": "e33aa4aa41847f48f727a0207834209c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9663, "upload_time": "2014-04-08T06:59:33", "url": "https://files.pythonhosted.org/packages/d9/3d/0a1f61bf4bc1f2eafaee71999480c7803dd14267015b96a5323369608e64/deform_autoneed-0.2.1b.tar.gz" } ], "0.2.2b": [ { "comment_text": "", "digests": { "md5": "c834f9766e097e4d62cbcf7bb60092ca", "sha256": "cba2967c077770d8789983e710badb4628a5bf1173f5d7120edeae40f93b6ca6" }, "downloads": -1, "filename": "deform_autoneed-0.2.2b.tar.gz", "has_sig": false, "md5_digest": "c834f9766e097e4d62cbcf7bb60092ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9933, "upload_time": "2014-04-08T12:32:44", "url": "https://files.pythonhosted.org/packages/df/7a/8272a016a6cf8a70f780dd6945e7b8a95d15a3c8fe617de740cd0ebbce05/deform_autoneed-0.2.2b.tar.gz" } ], "0.2.3b0": [ { "comment_text": "", "digests": { "md5": "57fdea2d161e97ffce1918e5c393e1d8", "sha256": "985ac0276f697011cd9e56c06e0c883c52395e270082f6ddc0700f8e60023051" }, "downloads": -1, "filename": "deform_autoneed-0.2.3b0.tar.gz", "has_sig": false, "md5_digest": "57fdea2d161e97ffce1918e5c393e1d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10118, "upload_time": "2017-02-08T14:01:57", "url": "https://files.pythonhosted.org/packages/d4/99/870e6048e94bbd3e5490d92151e0d7f1112b4fa58f22a69d754c12b863cf/deform_autoneed-0.2.3b0.tar.gz" } ], "0.2b": [ { "comment_text": "", "digests": { "md5": "a6a28d57f084235432d9df046c0b5e84", "sha256": "8b34edba91bd5081adc24857b79a91d9f1000076308dbc1e72cac7a61dcc7dea" }, "downloads": -1, "filename": "deform_autoneed-0.2b.tar.gz", "has_sig": false, "md5_digest": "a6a28d57f084235432d9df046c0b5e84", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9137, "upload_time": "2014-03-25T19:54:55", "url": "https://files.pythonhosted.org/packages/be/17/19c16322d645baff96a4f01bb1e563ab31ae316b3096e36bbacaadea0b3e/deform_autoneed-0.2b.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "57fdea2d161e97ffce1918e5c393e1d8", "sha256": "985ac0276f697011cd9e56c06e0c883c52395e270082f6ddc0700f8e60023051" }, "downloads": -1, "filename": "deform_autoneed-0.2.3b0.tar.gz", "has_sig": false, "md5_digest": "57fdea2d161e97ffce1918e5c393e1d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10118, "upload_time": "2017-02-08T14:01:57", "url": "https://files.pythonhosted.org/packages/d4/99/870e6048e94bbd3e5490d92151e0d7f1112b4fa58f22a69d754c12b863cf/deform_autoneed-0.2.3b0.tar.gz" } ] }