{ "info": { "author": "Tim Best", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Django Multi. Form View\n[![CircleCI](https://circleci.com/gh/TimBest/django-multi-form-view.svg?style=shield)](https://circleci.com/gh/TimBest/django-multi-form-view)\n[![codecov](https://codecov.io/gh/timbest/django-multi-form-view/branch/master/graph/badge.svg)](https://codecov.io/gh/timbest/django-multi-form-view)\n[![PyPI](https://img.shields.io/pypi/v/django-multi-form-view.svg?maxAge=2592000)](https://pypi.python.org/pypi/django-multi-form-view)\n\nDjango class based views for using more than one Form or ModelForm in a single view.\n\n## Install\n```bash\n$ pip install django-multi-form-view\n```\n\n## Usage\n\n### MultiFormView ([Example](demo/base/views.py))\n**class multi_form_view.MultiFormView**\nA single view that can display multiple Django forms. Handles displaying, redisplaying on error, and\nredirects on form success in.\n\n#### Extends\n* django.views.generic import FormView\n\n#### Attributes and Methods\n* `form_classes`\n A dictionary containing to forms for the view.\n* `are_forms_valid()`\n Check if all forms defined in `form_classes` are valid.\n* `forms_valid()`\n Redirects to get_success_url().\n* `forms_invalid()`\n Renders a response containing the form errors.\n* `get()`\n Render the forms.\n* `get_context_data()`\n Adds the results of `get_forms()` to the context dictionary with the key `'forms'`.\n* `get_forms()`.\n Initializes the forms defined in `form_classes` with initial data from `get_initial()` and kwargs\n from get_form_kwargs().\n* `get_form_kwargs()`.\n Build the keyword arguments required to instantiate the form.\n* `get_initial()`\n Returns a copy of `initial` with empty initial data dictionaries for each form.\n* `post()`\n Uses `are_forms_valid()` to call either `forms_valid()` or `forms_invalid()`.\n\n### MultiModelFormView ([Example](demo/base/views.py))\n**class multi_form_view.MultiModelFormView**\nA single view that can display multiple Django ModelForms. Handles displaying, redisplaying on\nerror, and redirects on form success in.\n\n#### Extends\n* multi_form_view.MultiFormView\n\n#### Attributes and Methods\n* `forms_valid()`\n Calls `save()` on each form.\n* `get_forms()`.\n Initializes the forms defined in `form_classes` with initial data from `get_initial()`, kwargs\n from get_form_kwargs() and form instance object from `get_objects()`.\n* `get_objects()`\n Returns dictionary with the instance objects for each form. Keys should match the corresponding\n form.\n\n## Demo\n```bash\n$ cd demo\n$ pip3 install -r requirements.txt\n$ python3 manage.py migrate\n$ python3 manage.py runserver\n```\n\n## Testing\nInstall [PhantomJS](http://phantomjs.org/)\n```bash\n$ python3 demo/manage.py behave\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TimBest/django-multi-form-view", "keywords": "", "license": "GNU licence, see LICENCE", "maintainer": "", "maintainer_email": "", "name": "django-multi-form-view", "package_url": "https://pypi.org/project/django-multi-form-view/", "platform": "", "project_url": "https://pypi.org/project/django-multi-form-view/", "project_urls": { "Homepage": "https://github.com/TimBest/django-multi-form-view" }, "release_url": "https://pypi.org/project/django-multi-form-view/2.0.1/", "requires_dist": null, "requires_python": "", "summary": "Class based views for handling more than one form in a single view", "version": "2.0.1" }, "last_serial": 4748880, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "62306025817b060308be61edc3614fb5", "sha256": "c4571595965d1cfa658adcbcd11836cca0ba04858198d2ba4da5ee59ca1dd114" }, "downloads": -1, "filename": "django-multi-form-view-0.0.1.tar.gz", "has_sig": false, "md5_digest": "62306025817b060308be61edc3614fb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1851, "upload_time": "2016-08-02T03:35:53", "url": "https://files.pythonhosted.org/packages/39/22/25c70e06d06f22660f1bba32e6e113fe61c42d54c6cebf6531550351d519/django-multi-form-view-0.0.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "da5a39f00822c42568dd91424e7e96f5", "sha256": "23321ba8e5368e6a825e4cacdb2670f5acf6717ef9d06e509f4c870f61e635b6" }, "downloads": -1, "filename": "django-multi-form-view-1.0.tar.gz", "has_sig": false, "md5_digest": "da5a39f00822c42568dd91424e7e96f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3016, "upload_time": "2016-11-06T22:09:15", "url": "https://files.pythonhosted.org/packages/08/7b/859741c8d3f9c71266d70e7960292db57542b568f384c49d78b017734ce8/django-multi-form-view-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "c8a07c02fd6a4d0f25abeb85f5a50d08", "sha256": "43604c9c941aeb01940de4430697f83c705900639d1fd3c729585dcb78e81706" }, "downloads": -1, "filename": "django-multi-form-view-1.1.tar.gz", "has_sig": false, "md5_digest": "c8a07c02fd6a4d0f25abeb85f5a50d08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2986, "upload_time": "2017-09-13T21:44:51", "url": "https://files.pythonhosted.org/packages/4b/55/13c0374a14a39c5a070b7ea5f24718898cc337524d998469057ca5857aca/django-multi-form-view-1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "7c6344bc923066bbdbe2899b8c3c4e4a", "sha256": "20eccab439497da5feeacea54ba2c52f9aadb127a08adfa8b2f724485c1c17ec" }, "downloads": -1, "filename": "django-multi-form-view-2.0.0.tar.gz", "has_sig": false, "md5_digest": "7c6344bc923066bbdbe2899b8c3c4e4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3005, "upload_time": "2017-09-14T09:50:48", "url": "https://files.pythonhosted.org/packages/47/3b/12027b4011c0ee7cab22467abbf310a42fcdd60daf8c55a19f3075723a6b/django-multi-form-view-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "f49606f86375fd65ecdf5ba9f79baf0f", "sha256": "de3a73ec914a7c02cae523ef080eb6024deb319ba5f219d5d1a7091220fbf7f1" }, "downloads": -1, "filename": "django_multi_form_view-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f49606f86375fd65ecdf5ba9f79baf0f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15961, "upload_time": "2019-01-28T07:43:35", "url": "https://files.pythonhosted.org/packages/7a/dc/960db3e628ae990e950ccd5d3d4cb6e209b7b656008eedd8980c17332d25/django_multi_form_view-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "460b209b07645b5e0ffba825493a7a7f", "sha256": "40bca9a6841392b10f9c029187f4063ae4f5493792a55d8b4ed4bfa299f608de" }, "downloads": -1, "filename": "django-multi-form-view-2.0.1.tar.gz", "has_sig": false, "md5_digest": "460b209b07645b5e0ffba825493a7a7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2991, "upload_time": "2019-01-28T07:43:37", "url": "https://files.pythonhosted.org/packages/2b/5d/914b79ddf555f9f1fa7d32f849adc749b97f29c203361c1ced2d816a47ae/django-multi-form-view-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f49606f86375fd65ecdf5ba9f79baf0f", "sha256": "de3a73ec914a7c02cae523ef080eb6024deb319ba5f219d5d1a7091220fbf7f1" }, "downloads": -1, "filename": "django_multi_form_view-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f49606f86375fd65ecdf5ba9f79baf0f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15961, "upload_time": "2019-01-28T07:43:35", "url": "https://files.pythonhosted.org/packages/7a/dc/960db3e628ae990e950ccd5d3d4cb6e209b7b656008eedd8980c17332d25/django_multi_form_view-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "460b209b07645b5e0ffba825493a7a7f", "sha256": "40bca9a6841392b10f9c029187f4063ae4f5493792a55d8b4ed4bfa299f608de" }, "downloads": -1, "filename": "django-multi-form-view-2.0.1.tar.gz", "has_sig": false, "md5_digest": "460b209b07645b5e0ffba825493a7a7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2991, "upload_time": "2019-01-28T07:43:37", "url": "https://files.pythonhosted.org/packages/2b/5d/914b79ddf555f9f1fa7d32f849adc749b97f29c203361c1ced2d816a47ae/django-multi-form-view-2.0.1.tar.gz" } ] }