Package: omniforms
Omni forms is a simple form builder with admin integration for django
versions >= 1.8 that allows you to easily create forms for your django website.Installationpip install omniformsOnce the package has been installed just addomni_formstoINSTALLED_APPSin your settings file:INSTALLED_APPS = ['omniforms',...]Once you’ve done this runpython manage.py migrateto migrate your
database.ConfigurationThe OmniForms application can be configured in a number of different
ways:Permitted content typesYou may not want administrators to be able to create forms foralldifferent types of content in your database. There are 2 different ways
of restricting the types of content that can be associated with model
forms created through the admin interface:OMNI_FORMS_CONTENT_TYPESIt is possible to define specific apps and/or models which can be used
by the omniforms app using theOMNI_FORMS_CONTENT_TYPESsetting.For example:The following configuration would allowanyof the models in the appfooand themodeloneandmodeltwomodels within thebarapp to be used.OMNI_FORMS_CONTENT_TYPES = [
    {'app_label': 'foo'},
    {'app_label': 'bar', 'model': 'modelone'},
    {'app_label': 'bar', 'model': 'modeltwo'},
]If theOMNI_FORMS_CONTENT_TYPESsetting is not defined it will
default toNoneand theOMNI_FORMS_EXCLUDED_CONTENT_TYPESsetting will be used instead (default values or otherwise).OMNI_FORMS_EXCLUDED_CONTENT_TYPESIt is possible to prevent model forms from being created for specific
apps or specific models using theOMNI_FORMS_EXCLUDED_CONTENT_TYPESsetting.For example:The following configuration would prevent forms being created foranyof the models in the appfooand for themodeloneandmodeltwomodels within thebarapp.OMNI_FORMS_EXCLUDED_CONTENT_TYPES = [
    {'app_label': 'foo'},
    {'app_label': 'bar', 'model': 'modelone'},
    {'app_label': 'bar', 'model': 'modeltwo'},
]If you do not specify this setting it will default to the following:OMNI_FORMS_EXCLUDED_CONTENT_TYPES = [
    {'app_label': 'omniforms'}
]This will prevent administrators from creating form_builder forms with
the formbuilder itself. It’s worth mentioning that allowing
administrators to do this represents a potential security risk and
should be avoided. As such, if you need to define your ownOMNI_FORMS_EXCLUDED_CONTENT_TYPESsetting it would be wise to
exclude allomniformsmodels as shown above.OMNI_FORMS_CUSTOM_FIELD_MAPPINGAlthough the omniforms app accounts for the majority of use cases you
may have models that use custom model fields. In these instances the
form builder will not be able to map a model field to a form field and
you will need to provide a custom field mapping using theOMNI_FORMS_CUSTOM_FIELD_MAPPINGsetting.Each key within the mapping dictionary must be a string (python
dotted import path) to a model field class.Each value within the mapping dictionary must be a string (python
dotted import path) to an OmniField subclass.For example, you can map a TagField to an OmniCharField model instance
using the following configuration:OMNI_FORMS_CUSTOM_FIELD_MAPPING = {
    'taggit.TagField': 'omniforms.models.OmniCharField',
}With this configuration any instances of taggit.TagField on your models
will be represented as charfields in the corresponding forms generated
by omniforms.It is also possible to create your own OmniField subclasses to use in
your custom form builders. For example:OMNI_FORMS_CUSTOM_FIELD_MAPPING = {
    'taggit.TagField': 'my_app.MySuperOmniField',
}It is important to note that the dictionary values defined within theOMNI_FORMS_CUSTOM_FIELD_MAPPINGMUST be subclasses ofomniforms.models.OmniField. If you attempt to register Field
handlers that do not subclassomniforms.models.OmniFieldan
ImproperlyConfigured exception will be raised.Wagtail IntegrationIf you would like to integrate the form builder withhttps://wagtail.io/you will need to add theomniforms.wagtailsubmodule to your applicationsINSTALLED_APPSsetting as well as theomniformsmodule e.g.INSTALLED_APPS = [
    'omniforms',
    'omniforms.wagtail',
    ...
]Once this has been done, run database migrationspython manage.py migrateand away you go.CompatibilityDjangoDjango 1.11.xWagtailWagtail 1.11.xWagtail 1.12.xWagtail 1.13.xPythonPython 2.7Python 3.4Python 3.5Python 3.6ChangeLog0.1 - Initial Build0.2 - Adds ability to create arbitrary non model form instances0.3 - Adds OmniChoiceField and OmniMultipleChoiceField form field types and wagtail integration