{ "info": { "author": "Johan Arensman", "author_email": "johan@frontendr.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.6", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP" ], "description": "# django-formed\n\nA form designer which can create multi-page forms with fieldsets, rows and multiple fields per row. Also an optional\nsummary page, multiple notification recipients, an automatic confirmation E-mail and custom form fields are possible.\n\nThe forms are built using pure Django forms which handle all validation and cleaning of form fields. The lay-out of the\nforms is handled in overridable templates. Developers can choose to render the form, fieldset, row or field\nautomatically by simply printing them or manually by iterating them and printing every bit of HTML themselves.\n\n## Table of contents\n\n- [Installation](#markdown-header-installation)\n + [Dependencies](#markdown-header-dependencies)\n + [Compatibility](#markdown-header-compatibility)\n- [Configuration](#markdown-header-configuration)\n- [Adding custom form fields](#markdown-header-adding-custom-form-fields)\n- [Credits](#markdown-header-credits)\n\n## Installation\n\nInstalling Formed is done via PyPi.\n\n pip install django-formed\n\nAfter installation the required database tables are creating by running the migration scripts.\n\n python manage.py migrate\n\n### Dependencies\n\nFormed has the following dependencies:\n\n- [Django](https://www.djangoproject.com/) *duh..*, at least version 1.6.11 and <= 1.9\n- [jsonfield](https://github.com/bradjasper/django-jsonfield) 1.0.3\n\n### Compatibility\n\nFormed supports Python 2.7 to 3.5.\n\n## Configuration\n\nFormed does not need any specific configuration but allows developers to customize a lot.\nHere are all useful settings:\n\n- `FORMED_FORM_FIELD_MODULES`, default: `(formed.form_fields, django.forms)`. Define which modules should be checked for\n form fields.\n- `FORMED_SESSION_NAME`, default: `'formed'`. The name of the session key in which the form data is stored.\n- `FORMED_DEFINITION_DEFAULT_FIELD_TYPE`, default: `'CharField'`.\n\n### Notifications\n\n- `FORMED_NOTIFICATION_FROM_EMAIL`, default: `settings.DEFAULT_FROM_EMAIL`. The E-mail from which notifications are\n sent.\n- `FORMED_NOTIFICATION_DEFAULT_SUBJECT`, default: `\"Submission of form '{name}'\"`. The subject of notification E-mails.\n Available tokens are: `{name}`: The name of the form, `{language}` the current language and `{site}` the current\n `Site` object (only when `FORMED_USE_SITES_FRAMEWORK` == `True`).\n\n### Form field rendering\n\n- `FORMED_FORM_ERROR_CSS_CLASS`, default: `'is-error'`. Passed to Django's Form class as the\n [`error_css_class`](https://docs.djangoproject.com/en/1.9/ref/forms/api/#django.forms.Form.error_css_class)\n parameter.\n- `FORMED_FORM_REQUIRED_CSS_CLASS`, default: `'is-required'`. Passed to Django's Form class as the\n [`required_css_class`](https://docs.djangoproject.com/en/1.9/ref/forms/api/#django.forms.Form.required_css_class)\n parameter.\n- `FORMED_FORM_OPTIONAL_CSS_CLASS`, default: `'is-optional'`. Not a real Django Form class parameter but this class is\n added to the form field container when the field is optional. The reason this setting exists is due to the fact that\n in practice, most fields are required. Not optional.\n- `FORMED_FORM_LABEL_SUFFIX`, default `''`. Passed to Django's Form class as the\n [`label_suffix`](https://docs.djangoproject.com/en/1.9/ref/forms/api/#django.forms.Form.label_suffix) parameter.\n- `FORMED_FORM_REQUIRED_LABEL_SUFFIX`, default: `None`. The suffix added to a label when a field is required.\n- `FORMED_FORM_OPTIONAL_LABEL_SUFFIX`, default: `_(' (optional)')`. The suffix added when a field is optional.\n\n### Admin\n\n- `FORMED_SHOW_JSON_FIELD`, default: `settings.DEBUG`. Boolean value whether or not to show the JSON field in the admin.\n- `FORMED_ADDITIONAL_FORM_FIELDS`, default: `{}`. A dictionary of additional form field types. Use this to add more form\n fields. See [Adding custom form fields](#custom-form-fields).\n- `FORMED_FORM_FIELDS`, default: `formed.settings.defaults.FORMED_FORM_FIELDS`. A dictionary with field type names as keys\n and dictionaries with field properties as values. This setting overrides **all** available form fields. See\n [Adding custom form fields](#custom-form-fields).\n- `FORMED_FORM_FIELD_CATEGORIES`, default: `formed.settings.defaults.FORMED_FORM_FIELD_CATEGORIES`. A dictionary\n with keys as category names and lists with field types. Override or extend this setting to add your own custom\n fields. See [Adding custom form fields](#custom-form-fields).\n\n\n### reCAPTCHA\n- `FORMED_USE_RECAPCHA`, default: `False`. Boolean value whether or not to use the reCAPTCHA option\n- `RECAPTCHA_SITE_KEY`, default: `None`. The reCAPTCHA site key as supplied by google\n- `RECAPTCHA_SECRET_KEY`, default: `None`. The reCAPTCHA secret key as supplied by google\n- `RECAPTCHA_SITE_VERIFY`, default: `https://www.google.com/recaptcha/api/siteverify`. \n\n\n\n### Third party integrations\n\n- `FORMED_USE_SITES_FRAMEWORK`, default: `'django.contrib.sites' in settings.INSTALLED_APPS`. Whether or not to add a\n sites form field to the FormDefinition Model.\n\n## Adding custom form fields\n\n**Step 1**. To add a custom form field you first need a custom field. Simply create a new file in your project, for example\n`form_fields.py` and create your form field. You could for example subclass one of the existing fields and add your own\nwidget.\n\n```\n#!python\n\nfrom django import forms\n\nclass MyCustomCharField(forms.CharField):\n widget = MyCustomWidget\n```\nFor more information on how to create form fields please see the\n[Django documentation](https://docs.djangoproject.com/en/1.9/ref/forms/fields/#creating-custom-fields).\n\n**Step 2**. In your settings add your form fields module to the `FORMED_FORM_FIELD_MODULES`. This allows Formed to\nactually find your custom fields.\n```\n#!python\nfrom my_project import form_fields\n\nFORMED_ADDITIONAL_FORM_FIELD_MODULES = [form_fields]\n```\n**Step 3**. In your settings use the setting `FORMED_ADDITIONAL_FORM_FIELDS` to make sure the editor knows how to\nhandle your form field.\n```\n#!python\nFORMED_ADDITIONAL_FORM_FIELDS = {\n 'custom_text': {\n # The type is the class name of our field.\n 'type': 'MyCustomCharField',\n # The name of the field in the drop down in the form editor.\n 'name': _('Custom text'),\n # The 'component' is used in the form editor in the admin.\n 'component': {\n # The name of the component template:\n 'name': 'text-input',\n # Additional parameters are passed in the component:\n 'type': 'text',\n }\n },\n}\n```\n\n**Step 4**. Add your field in the `FORMED_FORM_FIELD_CATEGORIES` dictionary. This actually adds your field in the field\ntypes drop down.\n\n```\n#!python\nfrom formed.settings.defaults import FORMED_FORM_FIELD_CATEGORIES\nfrom django.utils.translation import ugettext as _\n\nFORMED_FORM_FIELD_CATEGORIES.update({\n # We use gettext to make this category translatable, this is not required.\n _('My custom fields'): [\n # This is the key of our field in the FORMED_ADDITIONAL_FORM_FIELDS variable:\n 'custom_text',\n ]\n})\n```\n\nYour new field is now available in the editor and will be rendered in the template.\n\n## Credits\n\nThe admin interface uses the following JS libraries:\n\n- [Vue](https://vuejs.org/) for the editor.\n- [Sortable](https://github.com/RubaXa/Sortable) for drag and drop interaction.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/frontendr/django-formed", "keywords": "django forms builder", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-formed", "package_url": "https://pypi.org/project/django-formed/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-formed/", "project_urls": { "Homepage": "https://bitbucket.org/frontendr/django-formed" }, "release_url": "https://pypi.org/project/django-formed/1.0.0/", "requires_dist": [ "Django (<1.9.999,>=1.6.11)", "jsonfield (<1.1,>=1.0.3)" ], "requires_python": "", "summary": "A form designer application for Django", "version": "1.0.0" }, "last_serial": 4854501, "releases": { "0.9.10": [ { "comment_text": "", "digests": { "md5": "5888ac0d4d9bb4dd80dc26ca11654f7c", "sha256": "a60a72458f543fbecfb32465a71c83b36d7d748027d58e787e125b837cb15728" }, "downloads": -1, "filename": "django_formed-0.9.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5888ac0d4d9bb4dd80dc26ca11654f7c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 154803, "upload_time": "2016-09-29T12:27:00", "url": "https://files.pythonhosted.org/packages/ea/26/af3245b42e47a8d1dd2973cb0032902428dab198c6c18da96684647203ff/django_formed-0.9.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b82eb0521a50eab938df22c6c50421d1", "sha256": "f0484373bd182bd0e6ddb8c5e00f48c6d1f6e55b2e0d7d0c2e1aa4ece38a8915" }, "downloads": -1, "filename": "django-formed-0.9.10.tar.gz", "has_sig": false, "md5_digest": "b82eb0521a50eab938df22c6c50421d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137602, "upload_time": "2016-09-29T12:27:04", "url": "https://files.pythonhosted.org/packages/56/6e/bb7972339f7a39ef29231ba408061cb9c26f0a1f5c83d3927bbd6b8c2582/django-formed-0.9.10.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "f64e73e2f29c7f24dbfb0b78f9d8ef8c", "sha256": "200c23e37036bde7cd4f6abe8154250f6416c1e6ea25ae934d39e7ec24182be9" }, "downloads": -1, "filename": "django_formed-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f64e73e2f29c7f24dbfb0b78f9d8ef8c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 153022, "upload_time": "2019-02-22T13:43:45", "url": "https://files.pythonhosted.org/packages/0b/37/ce615b01eaa5532c9416f57f802a56b211976807da7e32fbb16a26984a6a/django_formed-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "907f9caa7fe690b49a748eeb3422da3d", "sha256": "29fc8e3483d45c8e5a0028924cd4646dbd84cbe1db4040d20a893119d9072555" }, "downloads": -1, "filename": "django-formed-1.0.0.tar.gz", "has_sig": false, "md5_digest": "907f9caa7fe690b49a748eeb3422da3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135786, "upload_time": "2019-02-22T13:43:47", "url": "https://files.pythonhosted.org/packages/05/75/1db5307e21d6f4c1d1589379982b2b76c56b3c70f46b99b3c84aa8cfabd9/django-formed-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f64e73e2f29c7f24dbfb0b78f9d8ef8c", "sha256": "200c23e37036bde7cd4f6abe8154250f6416c1e6ea25ae934d39e7ec24182be9" }, "downloads": -1, "filename": "django_formed-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f64e73e2f29c7f24dbfb0b78f9d8ef8c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 153022, "upload_time": "2019-02-22T13:43:45", "url": "https://files.pythonhosted.org/packages/0b/37/ce615b01eaa5532c9416f57f802a56b211976807da7e32fbb16a26984a6a/django_formed-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "907f9caa7fe690b49a748eeb3422da3d", "sha256": "29fc8e3483d45c8e5a0028924cd4646dbd84cbe1db4040d20a893119d9072555" }, "downloads": -1, "filename": "django-formed-1.0.0.tar.gz", "has_sig": false, "md5_digest": "907f9caa7fe690b49a748eeb3422da3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135786, "upload_time": "2019-02-22T13:43:47", "url": "https://files.pythonhosted.org/packages/05/75/1db5307e21d6f4c1d1589379982b2b76c56b3c70f46b99b3c84aa8cfabd9/django-formed-1.0.0.tar.gz" } ] }