{ "info": { "author": "James Pic", "author_email": "jpic@yourlabs.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://img.shields.io/pypi/dm/django-dynamic-fields.svg\n :target: https://pypi.python.org/pypi/django-dynamic-fields\n.. image:: https://secure.travis-ci.org/yourlabs/django-dynamic-fields.png?branch=master\n :target: http://travis-ci.org/yourlabs/django-dynamic-fields\n.. image:: https://codecov.io/github/yourlabs/django-dynamic-fields/coverage.svg?branch=master\n :target: https://codecov.io/github/yourlabs/django-dynamic-fields?branch=master\n.. image:: https://readthedocs.org/projects/django-dynamic-fields/badge/?version=develop\n :target: http://django-dynamic-fields.readthedocs.io/en/develop/?badge=develop\n :alt: Documentation status\n\nThis app provides features a form class dynamic, both on the client and server\nside. For example if you want a field to be remove if another field has a\nparticular value or to filter choices based on a set conditions. The `demo\n`_ is automatically updated when a commit is\n`tested\n`_ on master.\n\nPypy, Python 2.7, 3.4, Django 1.8+ are supported.\n\nExample\n=======\n\nFor example, if your form should allow support only if linux is\nselected:\n\n.. code-block:: python\n\n from ddf import shortcuts as ddf\n\n class TestForm(ddf.FormMixin, forms.Form):\n platform = forms.ChoiceField(choices=(\n ('Linux', 'Linux'),\n ('Windows', 'Windows'),\n ))\n service = forms.ChoiceField(choices=(\n ('Format', 'Format'),\n ('Support', 'Support')\n ))\n\n # Remove the 'Support' choice from the 'service' field if 'platform'\n # value is 'Windows':\n _ddf = dict(\n service=[\n ddf.RemoveChoices(\n ['Support'],\n ddf.ValueIs('platform', 'Windows'),\n )\n ]\n )\n\nIn this example, we create a configuration field and add the RemoveChoices\naction to the service field, with the condition that the platform field value\nis Windows.\n\nThe configuration field is able to render the configuration as a JSON dict,\nwith the form prefix it's being rendered with. Then, the equivalent of each\nAction and Condition objects are instanciated in JavaScript, allowing dynamic\nuser experience.\n\nA configuration is structured as such: for each field, you may add a list of\nactions, for each action a list of conditions. When the user changes a field,\neach action's conditions are evaluated and if they all pass then the action is\napplied, otherwise it is unapplied. Possibilities are huge here.\n\nDual-license\n============\n\nIt is released with the Creative Commons Attribution-NonCommercial 3.0 Unported\nLicense, but a commercial license is available, please get in touch my username\n@ yourlabs.org if you are interrested.\n\nNote that the money goes to YourLabs, a non-profit foundation to promote the\nrole of hackers in the process of making our society more fair and free, while\nusing their skills to develop local economy and give internet back to the\npeople.\n\nStatus\n======\n\nThe project is pretty young, but the basic building blocks are there. We should\nbe able to add actions and conditions easily.\n\nWhy\n===\n\nWe've been inventing this over and over again for years. The `first time I\ninvented this was in 2009 `_ and\nhonnestly my python, django and javascript skills were pretty weak back then.\nSince then, I've seen users asking this, paying me as a consultant for this,\nmaking `pull requests to have this in a per-app basis\n`_. It's about\ntime we have a generic solution that works for all kinds of fields, and not\njust the ones of the apps we maintain.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://django-dynamic-form.rtfd.org", "keywords": "django dynamic form", "license": "", "maintainer": "", "maintainer_email": "", "name": "ddf", "package_url": "https://pypi.org/project/ddf/", "platform": "", "project_url": "https://pypi.org/project/ddf/", "project_urls": { "Homepage": "http://django-dynamic-form.rtfd.org" }, "release_url": "https://pypi.org/project/ddf/0.0.0/", "requires_dist": null, "requires_python": "", "summary": "Dynamic forms for Django", "version": "0.0.0" }, "last_serial": 2384088, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "c80ede3afbd71c3494c974f73d1587a9", "sha256": "c5333ae01ecb349218580229933d4861addbd2b37371c49f670276a4c73be88b" }, "downloads": -1, "filename": "ddf-0.0.0.tar.gz", "has_sig": true, "md5_digest": "c80ede3afbd71c3494c974f73d1587a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5310, "upload_time": "2016-10-06T12:45:13", "url": "https://files.pythonhosted.org/packages/50/76/c27665c20e526c9eff51c2ec613e909b46a7eb6f4146e44aa9618c42e3ea/ddf-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c80ede3afbd71c3494c974f73d1587a9", "sha256": "c5333ae01ecb349218580229933d4861addbd2b37371c49f670276a4c73be88b" }, "downloads": -1, "filename": "ddf-0.0.0.tar.gz", "has_sig": true, "md5_digest": "c80ede3afbd71c3494c974f73d1587a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5310, "upload_time": "2016-10-06T12:45:13", "url": "https://files.pythonhosted.org/packages/50/76/c27665c20e526c9eff51c2ec613e909b46a7eb6f4146e44aa9618c42e3ea/ddf-0.0.0.tar.gz" } ] }