fobi package¶
Subpackages¶
- fobi.contrib package
- Subpackages
- fobi.contrib.apps package
- Subpackages
- fobi.contrib.apps.djangocms_integration package
- Submodules
- fobi.contrib.apps.djangocms_integration.apps module
- fobi.contrib.apps.djangocms_integration.cms_plugins module
- fobi.contrib.apps.djangocms_integration.cms_version module
- fobi.contrib.apps.djangocms_integration.conf module
- fobi.contrib.apps.djangocms_integration.defaults module
- fobi.contrib.apps.djangocms_integration.helpers module
- fobi.contrib.apps.djangocms_integration.models module
- fobi.contrib.apps.djangocms_integration.settings module
- Module contents
- fobi.contrib.apps.drf_integration package
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements package
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements.content package
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements.content.content_image package
- fobi.contrib.apps.drf_integration.form_elements.content.content_image_url package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.content.content_image_url.apps module
- fobi.contrib.apps.drf_integration.form_elements.content.content_image_url.base module
- fobi.contrib.apps.drf_integration.form_elements.content.content_image_url.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.content.content_markdown package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.content.content_markdown.apps module
- fobi.contrib.apps.drf_integration.form_elements.content.content_markdown.base module
- fobi.contrib.apps.drf_integration.form_elements.content.content_markdown.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.content.content_richtext package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.content.content_richtext.apps module
- fobi.contrib.apps.drf_integration.form_elements.content.content_richtext.base module
- fobi.contrib.apps.drf_integration.form_elements.content.content_richtext.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.content.content_text package
- fobi.contrib.apps.drf_integration.form_elements.content.content_video package
- Module contents
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements.fields package
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements.fields.boolean package
- fobi.contrib.apps.drf_integration.form_elements.fields.checkbox_select_multiple package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.fields.checkbox_select_multiple.apps module
- fobi.contrib.apps.drf_integration.form_elements.fields.checkbox_select_multiple.base module
- fobi.contrib.apps.drf_integration.form_elements.fields.checkbox_select_multiple.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.fields.date package
- fobi.contrib.apps.drf_integration.form_elements.fields.date_drop_down package
- fobi.contrib.apps.drf_integration.form_elements.fields.datetime package
- fobi.contrib.apps.drf_integration.form_elements.fields.decimal package
- fobi.contrib.apps.drf_integration.form_elements.fields.duration package
- fobi.contrib.apps.drf_integration.form_elements.fields.email package
- fobi.contrib.apps.drf_integration.form_elements.fields.file package
- fobi.contrib.apps.drf_integration.form_elements.fields.float package
- fobi.contrib.apps.drf_integration.form_elements.fields.hidden package
- fobi.contrib.apps.drf_integration.form_elements.fields.input package
- fobi.contrib.apps.drf_integration.form_elements.fields.integer package
- fobi.contrib.apps.drf_integration.form_elements.fields.ip_address package
- fobi.contrib.apps.drf_integration.form_elements.fields.null_boolean package
- fobi.contrib.apps.drf_integration.form_elements.fields.password package
- fobi.contrib.apps.drf_integration.form_elements.fields.radio package
- fobi.contrib.apps.drf_integration.form_elements.fields.range_select package
- fobi.contrib.apps.drf_integration.form_elements.fields.regex package
- fobi.contrib.apps.drf_integration.form_elements.fields.select package
- fobi.contrib.apps.drf_integration.form_elements.fields.select_model_object package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.fields.select_model_object.apps module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_model_object.base module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_model_object.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple.apps module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple.base module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_model_objects package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_model_objects.apps module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_model_objects.base module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_model_objects.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_with_max package
- Submodules
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_with_max.apps module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_with_max.base module
- fobi.contrib.apps.drf_integration.form_elements.fields.select_multiple_with_max.fobi_integration_form_elements module
- Module contents
- fobi.contrib.apps.drf_integration.form_elements.fields.slider package
- fobi.contrib.apps.drf_integration.form_elements.fields.slug package
- fobi.contrib.apps.drf_integration.form_elements.fields.text package
- fobi.contrib.apps.drf_integration.form_elements.fields.textarea package
- fobi.contrib.apps.drf_integration.form_elements.fields.time package
- fobi.contrib.apps.drf_integration.form_elements.fields.url package
- Module contents
- Subpackages
- fobi.contrib.apps.drf_integration.form_elements.content package
- Module contents
- Subpackages
- fobi.contrib.apps.drf_integration.form_handlers package
- fobi.contrib.apps.drf_integration.form_elements package
- Submodules
- fobi.contrib.apps.drf_integration.apps module
- fobi.contrib.apps.drf_integration.base module
- fobi.contrib.apps.drf_integration.dynamic module
- fobi.contrib.apps.drf_integration.fields module
- fobi.contrib.apps.drf_integration.helpers module
- fobi.contrib.apps.drf_integration.metadata module
- fobi.contrib.apps.drf_integration.serializers module
- fobi.contrib.apps.drf_integration.urls module
- fobi.contrib.apps.drf_integration.utils module
- fobi.contrib.apps.drf_integration.views module
- Module contents
- Subpackages
- fobi.contrib.apps.feincms_integration package
- Submodules
- fobi.contrib.apps.feincms_integration.apps module
- fobi.contrib.apps.feincms_integration.conf module
- fobi.contrib.apps.feincms_integration.defaults module
- fobi.contrib.apps.feincms_integration.helpers module
- fobi.contrib.apps.feincms_integration.settings module
- fobi.contrib.apps.feincms_integration.widgets module
- Module contents
- fobi.contrib.apps.mezzanine_integration package
- Submodules
- fobi.contrib.apps.mezzanine_integration.admin module
- fobi.contrib.apps.mezzanine_integration.apps module
- fobi.contrib.apps.mezzanine_integration.conf module
- fobi.contrib.apps.mezzanine_integration.defaults module
- fobi.contrib.apps.mezzanine_integration.helpers module
- fobi.contrib.apps.mezzanine_integration.models module
- fobi.contrib.apps.mezzanine_integration.page_processors module
- fobi.contrib.apps.mezzanine_integration.settings module
- Module contents
- fobi.contrib.apps.djangocms_integration package
- Module contents
- Subpackages
- fobi.contrib.plugins package
- Subpackages
- fobi.contrib.plugins.form_elements package
- Subpackages
- fobi.contrib.plugins.form_elements.content package
- Subpackages
- fobi.contrib.plugins.form_elements.content.content_image package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_image.apps module
- fobi.contrib.plugins.form_elements.content.content_image.base module
- fobi.contrib.plugins.form_elements.content.content_image.conf module
- fobi.contrib.plugins.form_elements.content.content_image.defaults module
- fobi.contrib.plugins.form_elements.content.content_image.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_image.forms module
- fobi.contrib.plugins.form_elements.content.content_image.helpers module
- fobi.contrib.plugins.form_elements.content.content_image.settings module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_image_url package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_image_url.apps module
- fobi.contrib.plugins.form_elements.content.content_image_url.base module
- fobi.contrib.plugins.form_elements.content.content_image_url.conf module
- fobi.contrib.plugins.form_elements.content.content_image_url.defaults module
- fobi.contrib.plugins.form_elements.content.content_image_url.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_image_url.forms module
- fobi.contrib.plugins.form_elements.content.content_image_url.settings module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_markdown package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_markdown.apps module
- fobi.contrib.plugins.form_elements.content.content_markdown.base module
- fobi.contrib.plugins.form_elements.content.content_markdown.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_markdown.forms module
- fobi.contrib.plugins.form_elements.content.content_markdown.widgets module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_richtext package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_richtext.apps module
- fobi.contrib.plugins.form_elements.content.content_richtext.base module
- fobi.contrib.plugins.form_elements.content.content_richtext.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_richtext.forms module
- fobi.contrib.plugins.form_elements.content.content_richtext.widgets module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_text package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_text.apps module
- fobi.contrib.plugins.form_elements.content.content_text.base module
- fobi.contrib.plugins.form_elements.content.content_text.conf module
- fobi.contrib.plugins.form_elements.content.content_text.defaults module
- fobi.contrib.plugins.form_elements.content.content_text.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_text.forms module
- fobi.contrib.plugins.form_elements.content.content_text.settings module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_video package
- Submodules
- fobi.contrib.plugins.form_elements.content.content_video.apps module
- fobi.contrib.plugins.form_elements.content.content_video.base module
- fobi.contrib.plugins.form_elements.content.content_video.conf module
- fobi.contrib.plugins.form_elements.content.content_video.defaults module
- fobi.contrib.plugins.form_elements.content.content_video.fobi_form_elements module
- fobi.contrib.plugins.form_elements.content.content_video.forms module
- fobi.contrib.plugins.form_elements.content.content_video.settings module
- Module contents
- fobi.contrib.plugins.form_elements.content.content_image package
- Module contents
- Subpackages
- fobi.contrib.plugins.form_elements.fields package
- Subpackages
- fobi.contrib.plugins.form_elements.fields.boolean package
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple package
- Submodules
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.apps module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.base module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.conf module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.defaults module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.forms module
- fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.date package
- Submodules
- fobi.contrib.plugins.form_elements.fields.date.apps module
- fobi.contrib.plugins.form_elements.fields.date.base module
- fobi.contrib.plugins.form_elements.fields.date.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.date.forms module
- fobi.contrib.plugins.form_elements.fields.date.widgets module
- Module contents
- fobi.contrib.plugins.form_elements.fields.date_drop_down package
- Submodules
- fobi.contrib.plugins.form_elements.fields.date_drop_down.apps module
- fobi.contrib.plugins.form_elements.fields.date_drop_down.base module
- fobi.contrib.plugins.form_elements.fields.date_drop_down.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.date_drop_down.forms module
- Module contents
- fobi.contrib.plugins.form_elements.fields.datetime package
- Submodules
- fobi.contrib.plugins.form_elements.fields.datetime.apps module
- fobi.contrib.plugins.form_elements.fields.datetime.base module
- fobi.contrib.plugins.form_elements.fields.datetime.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.datetime.forms module
- fobi.contrib.plugins.form_elements.fields.datetime.widgets module
- Module contents
- fobi.contrib.plugins.form_elements.fields.decimal package
- fobi.contrib.plugins.form_elements.fields.duration package
- fobi.contrib.plugins.form_elements.fields.email package
- fobi.contrib.plugins.form_elements.fields.file package
- Submodules
- fobi.contrib.plugins.form_elements.fields.file.apps module
- fobi.contrib.plugins.form_elements.fields.file.base module
- fobi.contrib.plugins.form_elements.fields.file.conf module
- fobi.contrib.plugins.form_elements.fields.file.defaults module
- fobi.contrib.plugins.form_elements.fields.file.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.file.forms module
- fobi.contrib.plugins.form_elements.fields.file.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.float package
- fobi.contrib.plugins.form_elements.fields.hidden package
- fobi.contrib.plugins.form_elements.fields.input package
- Submodules
- fobi.contrib.plugins.form_elements.fields.input.apps module
- fobi.contrib.plugins.form_elements.fields.input.base module
- fobi.contrib.plugins.form_elements.fields.input.constants module
- fobi.contrib.plugins.form_elements.fields.input.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.input.forms module
- Module contents
- fobi.contrib.plugins.form_elements.fields.integer package
- fobi.contrib.plugins.form_elements.fields.ip_address package
- Submodules
- fobi.contrib.plugins.form_elements.fields.ip_address.apps module
- fobi.contrib.plugins.form_elements.fields.ip_address.base module
- fobi.contrib.plugins.form_elements.fields.ip_address.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.ip_address.forms module
- Module contents
- fobi.contrib.plugins.form_elements.fields.null_boolean package
- Submodules
- fobi.contrib.plugins.form_elements.fields.null_boolean.apps module
- fobi.contrib.plugins.form_elements.fields.null_boolean.base module
- fobi.contrib.plugins.form_elements.fields.null_boolean.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.null_boolean.forms module
- Module contents
- fobi.contrib.plugins.form_elements.fields.password package
- fobi.contrib.plugins.form_elements.fields.radio package
- Submodules
- fobi.contrib.plugins.form_elements.fields.radio.apps module
- fobi.contrib.plugins.form_elements.fields.radio.base module
- fobi.contrib.plugins.form_elements.fields.radio.conf module
- fobi.contrib.plugins.form_elements.fields.radio.defaults module
- fobi.contrib.plugins.form_elements.fields.radio.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.radio.forms module
- fobi.contrib.plugins.form_elements.fields.radio.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.range_select package
- Submodules
- fobi.contrib.plugins.form_elements.fields.range_select.apps module
- fobi.contrib.plugins.form_elements.fields.range_select.base module
- fobi.contrib.plugins.form_elements.fields.range_select.conf module
- fobi.contrib.plugins.form_elements.fields.range_select.defaults module
- fobi.contrib.plugins.form_elements.fields.range_select.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.range_select.forms module
- fobi.contrib.plugins.form_elements.fields.range_select.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.regex package
- fobi.contrib.plugins.form_elements.fields.select package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select.apps module
- fobi.contrib.plugins.form_elements.fields.select.base module
- fobi.contrib.plugins.form_elements.fields.select.conf module
- fobi.contrib.plugins.form_elements.fields.select.defaults module
- fobi.contrib.plugins.form_elements.fields.select.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select.forms module
- fobi.contrib.plugins.form_elements.fields.select.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_model_object package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_model_object.apps module
- fobi.contrib.plugins.form_elements.fields.select_model_object.base module
- fobi.contrib.plugins.form_elements.fields.select_model_object.conf module
- fobi.contrib.plugins.form_elements.fields.select_model_object.defaults module
- fobi.contrib.plugins.form_elements.fields.select_model_object.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_model_object.forms module
- fobi.contrib.plugins.form_elements.fields.select_model_object.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.apps module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.base module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.conf module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.defaults module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.forms module
- fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_multiple package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_multiple.apps module
- fobi.contrib.plugins.form_elements.fields.select_multiple.base module
- fobi.contrib.plugins.form_elements.fields.select_multiple.conf module
- fobi.contrib.plugins.form_elements.fields.select_multiple.defaults module
- fobi.contrib.plugins.form_elements.fields.select_multiple.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_multiple.forms module
- fobi.contrib.plugins.form_elements.fields.select_multiple.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.apps module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.base module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.conf module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.defaults module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.forms module
- fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.apps module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.base module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.conf module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.defaults module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.forms module
- fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max package
- Submodules
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.apps module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.base module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.conf module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.defaults module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.fields module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.forms module
- fobi.contrib.plugins.form_elements.fields.select_multiple_with_max.settings module
- Module contents
- fobi.contrib.plugins.form_elements.fields.slider package
- Submodules
- fobi.contrib.plugins.form_elements.fields.slider.apps module
- fobi.contrib.plugins.form_elements.fields.slider.base module
- fobi.contrib.plugins.form_elements.fields.slider.conf module
- fobi.contrib.plugins.form_elements.fields.slider.constants module
- fobi.contrib.plugins.form_elements.fields.slider.defaults module
- fobi.contrib.plugins.form_elements.fields.slider.fobi_form_elements module
- fobi.contrib.plugins.form_elements.fields.slider.forms module
- fobi.contrib.plugins.form_elements.fields.slider.helpers module
- fobi.contrib.plugins.form_elements.fields.slider.settings module
- fobi.contrib.plugins.form_elements.fields.slider.widgets module
- Module contents
- fobi.contrib.plugins.form_elements.fields.slug package
- fobi.contrib.plugins.form_elements.fields.text package
- fobi.contrib.plugins.form_elements.fields.textarea package
- fobi.contrib.plugins.form_elements.fields.time package
- fobi.contrib.plugins.form_elements.fields.url package
- Module contents
- Subpackages
- fobi.contrib.plugins.form_elements.security package
- Subpackages
- fobi.contrib.plugins.form_elements.security.captcha package
- fobi.contrib.plugins.form_elements.security.honeypot package
- Submodules
- fobi.contrib.plugins.form_elements.security.honeypot.apps module
- fobi.contrib.plugins.form_elements.security.honeypot.base module
- fobi.contrib.plugins.form_elements.security.honeypot.conf module
- fobi.contrib.plugins.form_elements.security.honeypot.defaults module
- fobi.contrib.plugins.form_elements.security.honeypot.fields module
- fobi.contrib.plugins.form_elements.security.honeypot.fobi_form_elements module
- fobi.contrib.plugins.form_elements.security.honeypot.forms module
- fobi.contrib.plugins.form_elements.security.honeypot.settings module
- Module contents
- fobi.contrib.plugins.form_elements.security.recaptcha package
- Submodules
- fobi.contrib.plugins.form_elements.security.recaptcha.apps module
- fobi.contrib.plugins.form_elements.security.recaptcha.base module
- fobi.contrib.plugins.form_elements.security.recaptcha.fobi_form_elements module
- fobi.contrib.plugins.form_elements.security.recaptcha.forms module
- Module contents
- Module contents
- Subpackages
- fobi.contrib.plugins.form_elements.test package
- fobi.contrib.plugins.form_elements.content package
- Module contents
- Subpackages
- fobi.contrib.plugins.form_handlers package
- Subpackages
- fobi.contrib.plugins.form_handlers.db_store package
- Subpackages
- Submodules
- fobi.contrib.plugins.form_handlers.db_store.admin module
- fobi.contrib.plugins.form_handlers.db_store.apps module
- fobi.contrib.plugins.form_handlers.db_store.base module
- fobi.contrib.plugins.form_handlers.db_store.callbacks module
- fobi.contrib.plugins.form_handlers.db_store.conf module
- fobi.contrib.plugins.form_handlers.db_store.defaults module
- fobi.contrib.plugins.form_handlers.db_store.fobi_form_handlers module
- fobi.contrib.plugins.form_handlers.db_store.helpers module
- fobi.contrib.plugins.form_handlers.db_store.models module
- fobi.contrib.plugins.form_handlers.db_store.settings module
- fobi.contrib.plugins.form_handlers.db_store.views module
- fobi.contrib.plugins.form_handlers.db_store.widgets module
- Module contents
- fobi.contrib.plugins.form_handlers.http_repost package
- fobi.contrib.plugins.form_handlers.mail package
- Submodules
- fobi.contrib.plugins.form_handlers.mail.apps module
- fobi.contrib.plugins.form_handlers.mail.base module
- fobi.contrib.plugins.form_handlers.mail.callbacks module
- fobi.contrib.plugins.form_handlers.mail.conf module
- fobi.contrib.plugins.form_handlers.mail.defaults module
- fobi.contrib.plugins.form_handlers.mail.fields module
- fobi.contrib.plugins.form_handlers.mail.fobi_form_handlers module
- fobi.contrib.plugins.form_handlers.mail.forms module
- fobi.contrib.plugins.form_handlers.mail.helpers module
- fobi.contrib.plugins.form_handlers.mail.mixins module
- fobi.contrib.plugins.form_handlers.mail.settings module
- fobi.contrib.plugins.form_handlers.mail.widgets module
- Module contents
- fobi.contrib.plugins.form_handlers.db_store package
- Module contents
- Subpackages
- fobi.contrib.plugins.form_importers package
- Subpackages
- fobi.contrib.plugins.form_importers.mailchimp_importer package
- Submodules
- fobi.contrib.plugins.form_importers.mailchimp_importer.apps module
- fobi.contrib.plugins.form_importers.mailchimp_importer.base module
- fobi.contrib.plugins.form_importers.mailchimp_importer.fobi_form_importers module
- fobi.contrib.plugins.form_importers.mailchimp_importer.forms module
- fobi.contrib.plugins.form_importers.mailchimp_importer.views module
- Module contents
- fobi.contrib.plugins.form_importers.mailchimp_importer package
- Module contents
- Subpackages
- fobi.contrib.plugins.form_elements package
- Module contents
- Subpackages
- fobi.contrib.themes package
- Subpackages
- fobi.contrib.themes.bootstrap3 package
- Subpackages
- fobi.contrib.themes.bootstrap3.widgets package
- Subpackages
- fobi.contrib.themes.bootstrap3.widgets.form_elements package
- Subpackages
- fobi.contrib.themes.bootstrap3.widgets.form_elements.content_markdown_bootstrap3_widget package
- fobi.contrib.themes.bootstrap3.widgets.form_elements.content_richtext_bootstrap3_widget package
- fobi.contrib.themes.bootstrap3.widgets.form_elements.date_bootstrap3_widget package
- fobi.contrib.themes.bootstrap3.widgets.form_elements.datetime_bootstrap3_widget package
- fobi.contrib.themes.bootstrap3.widgets.form_elements.dummy_bootstrap3_widget package
- fobi.contrib.themes.bootstrap3.widgets.form_elements.slider_bootstrap3_widget package
- Module contents
- Subpackages
- fobi.contrib.themes.bootstrap3.widgets.form_elements package
- Module contents
- Subpackages
- fobi.contrib.themes.bootstrap3.widgets package
- Submodules
- fobi.contrib.themes.bootstrap3.apps module
- fobi.contrib.themes.bootstrap3.fobi_themes module
- Module contents
- Subpackages
- fobi.contrib.themes.djangocms_admin_style_theme package
- Subpackages
- fobi.contrib.themes.djangocms_admin_style_theme.widgets package
- Subpackages
- fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements package
- fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_handlers package
- Module contents
- Subpackages
- fobi.contrib.themes.djangocms_admin_style_theme.widgets package
- Submodules
- fobi.contrib.themes.djangocms_admin_style_theme.apps module
- fobi.contrib.themes.djangocms_admin_style_theme.fobi_themes module
- Module contents
- Subpackages
- fobi.contrib.themes.foundation5 package
- Subpackages
- fobi.contrib.themes.foundation5.widgets package
- Subpackages
- fobi.contrib.themes.foundation5.widgets.form_elements package
- Subpackages
- fobi.contrib.themes.foundation5.widgets.form_elements.content_richtext_foundation5_widget package
- fobi.contrib.themes.foundation5.widgets.form_elements.date_foundation5_widget package
- fobi.contrib.themes.foundation5.widgets.form_elements.datetime_foundation5_widget package
- fobi.contrib.themes.foundation5.widgets.form_elements.dummy_foundation5_widget package
- Module contents
- Subpackages
- fobi.contrib.themes.foundation5.widgets.form_handlers package
- fobi.contrib.themes.foundation5.widgets.form_elements package
- Module contents
- Subpackages
- fobi.contrib.themes.foundation5.widgets package
- Submodules
- fobi.contrib.themes.foundation5.apps module
- fobi.contrib.themes.foundation5.fobi_themes module
- Module contents
- Subpackages
- fobi.contrib.themes.simple package
- Subpackages
- fobi.contrib.themes.simple.widgets package
- Submodules
- fobi.contrib.themes.simple.apps module
- fobi.contrib.themes.simple.fobi_themes module
- Module contents
- Subpackages
- fobi.contrib.themes.bootstrap3 package
- Module contents
- Subpackages
- fobi.contrib.apps package
- Module contents
- Subpackages
- fobi.integration package
- fobi.management package
- fobi.migrations package
- Submodules
- fobi.migrations.0001_initial module
- fobi.migrations.0002_auto_20150912_1744 module
- fobi.migrations.0003_auto_20160517_1005 module
- fobi.migrations.0004_auto_20160906_1513 module
- fobi.migrations.0005_auto_20160908_1457 module
- fobi.migrations.0006_auto_20160911_1549 module
- fobi.migrations.0007_auto_20160926_1652 module
- fobi.migrations.0008_formwizardhandlerentry module
- fobi.migrations.0009_formwizardentry_wizard_type module
- fobi.migrations.0010_formwizardhandler module
- fobi.migrations.0011_formentry_title module
- fobi.migrations.0012_auto_20161109_1550 module
- fobi.migrations.0013_formwizardentry_show_all_navigation_buttons module
- fobi.migrations.0014_auto_20170516_1413 module
- Module contents
- fobi.reusable package
- fobi.templatetags package
- fobi.tests package
- Submodules
- fobi.tests.base module
- fobi.tests.constants module
- fobi.tests.core module
- fobi.tests.data module
- fobi.tests.helpers module
- fobi.tests.test_browser_build_dynamic_forms module
- fobi.tests.test_core module
- fobi.tests.test_drf_integration module
- fobi.tests.test_dynamic_forms module
- fobi.tests.test_feincms_integration module
- fobi.tests.test_form_importers_mailchimp module
- fobi.tests.test_sortable_dict module
- Module contents
- fobi.urls package
- fobi.wizard package
Submodules¶
fobi.admin module¶
-
fobi.admin.
base_bulk_change_plugins
(PluginForm, named_url, modeladmin, request, queryset)[source]¶ Bulk change of plugins action additional view.
-
class
fobi.admin.
BasePluginModelAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
Base plugin admin.
-
BasePluginModelAdmin.
bulk_change_plugins
(*args, **kwargs)[source]¶ Bulk change plugins.
This is where the data is actually processed.
-
BasePluginModelAdmin.
fieldsets
= ((None, {'fields': ('plugin_uid', 'users', 'groups')}),)¶
-
BasePluginModelAdmin.
filter_horizontal
= ('users', 'groups')¶
-
BasePluginModelAdmin.
has_add_permission
(request)[source]¶ Has add permissions.
We don’t want to allow to add form elements/handlers manually. It should happen using the management command
fobi_sync_plugins
instead.
-
BasePluginModelAdmin.
list_display
= ('plugin_uid_admin', 'users_list', 'groups_list')¶
-
BasePluginModelAdmin.
media
¶
-
BasePluginModelAdmin.
readonly_fields
= ('plugin_uid', 'plugin_uid_admin')¶
-
-
fobi.admin.
bulk_change_form_element_plugins
(modeladmin, request, queryset)[source]¶ Bulk change FormElement plugins.
-
fobi.admin.
bulk_change_form_handler_plugins
(modeladmin, request, queryset)[source]¶ Bulk change FormHandler plugins.
-
fobi.admin.
bulk_change_form_wizard_handler_plugins
(modeladmin, request, queryset)[source]¶ Bulk change FormWizardHandler plugins.
-
class
fobi.admin.
FormElementAdmin
(model, admin_site)[source]¶ Bases:
fobi.admin.BasePluginModelAdmin
FormElement admin.
-
actions
= [<function bulk_change_form_element_plugins at 0x7f5a5e8a15f0>]¶
-
media
¶
-
-
class
fobi.admin.
FormElementEntryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
FormElementEntry admin.
-
FormElementEntryAdmin.
fieldsets
= ((<django.utils.functional.__proxy__ object at 0x7f5a5e8bf150>, {'fields': ('plugin_uid', 'plugin_data')}), (<django.utils.functional.__proxy__ object at 0x7f5a5e8bf1d0>, {'fields': ('form_entry', 'form_fieldset_entry', 'position')}))¶
-
FormElementEntryAdmin.
list_display
= ('plugin_uid', 'plugin_uid_code', 'plugin_data', 'position', 'form_entry')¶
-
FormElementEntryAdmin.
list_editable
= ('position',)¶
-
FormElementEntryAdmin.
list_filter
= ('form_entry', 'plugin_uid')¶
-
FormElementEntryAdmin.
media
¶
-
FormElementEntryAdmin.
readonly_fields
= ('plugin_uid_code',)¶
-
-
class
fobi.admin.
FormElementEntryInlineAdmin
(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline
FormElementEntry inline admin.
-
extra
= 0¶
-
fields
= ('form_entry', 'plugin_uid', 'plugin_data', 'position')¶
-
form
¶ alias of
FormElementEntryForm
-
media
¶
-
model
¶ alias of
FormElementEntry
-
-
class
fobi.admin.
FormEntryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
FormEntry admin.
-
FormEntryAdmin.
fieldsets
= ((<django.utils.functional.__proxy__ object at 0x7f5a5f31f810>, {'fields': ('name', 'is_public', 'is_cloneable')}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f050>, {'fields': ('success_page_title', 'success_page_message', 'action'), 'classes': ('collapse',)}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f110>, {'fields': ('user',), 'classes': ('collapse',)}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f150>, {'fields': ('slug',), 'classes': ('collapse',)}))¶
-
FormEntryAdmin.
inlines
= [<class 'fobi.admin.FormElementEntryInlineAdmin'>, <class 'fobi.admin.FormHandlerEntryInlineAdmin'>]¶
-
FormEntryAdmin.
list_display
= ('name', 'slug', 'user', 'is_public', 'created', 'updated', 'is_cloneable')¶
-
FormEntryAdmin.
list_editable
= ('is_public', 'is_cloneable')¶
-
FormEntryAdmin.
list_filter
= ('is_public', 'is_cloneable')¶
-
FormEntryAdmin.
media
¶
-
FormEntryAdmin.
radio_fields
= {'user': 2}¶
-
FormEntryAdmin.
readonly_fields
= ('slug',)¶
-
-
class
fobi.admin.
FormFieldsetEntryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
FormEieldsetEntry admin.
-
FormFieldsetEntryAdmin.
fieldsets
= ((None, {'fields': ('form_entry', 'name', 'is_repeatable')}),)¶
-
FormFieldsetEntryAdmin.
list_display
= ('form_entry', 'name', 'is_repeatable')¶
-
FormFieldsetEntryAdmin.
list_editable
= ('is_repeatable',)¶
-
FormFieldsetEntryAdmin.
list_filter
= ('is_repeatable',)¶
-
FormFieldsetEntryAdmin.
media
¶
-
-
class
fobi.admin.
FormHandlerAdmin
(model, admin_site)[source]¶ Bases:
fobi.admin.BasePluginModelAdmin
FormHandler admin.
-
actions
= [<function bulk_change_form_handler_plugins at 0x7f5a5e8a1668>]¶
-
media
¶
-
-
class
fobi.admin.
FormHandlerEntryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
FormHandlerEntry admin.
-
FormHandlerEntryAdmin.
fieldsets
= ((<django.utils.functional.__proxy__ object at 0x7f5a5e8bf390>, {'fields': ('plugin_uid', 'plugin_data')}), (<django.utils.functional.__proxy__ object at 0x7f5a5e8bf410>, {'fields': ('form_entry',)}))¶
-
FormHandlerEntryAdmin.
list_display
= ('plugin_uid', 'plugin_uid_code', 'plugin_data', 'form_entry')¶
-
FormHandlerEntryAdmin.
list_filter
= ('form_entry', 'plugin_uid')¶
-
FormHandlerEntryAdmin.
media
¶
-
FormHandlerEntryAdmin.
readonly_fields
= ('plugin_uid_code',)¶
-
-
class
fobi.admin.
FormHandlerEntryInlineAdmin
(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline
FormHandlerEntry inline admin.
-
extra
= 0¶
-
fields
= ('form_entry', 'plugin_uid', 'plugin_data')¶
-
form
¶ alias of
FormHandlerEntryForm
-
media
¶
-
model
¶ alias of
FormHandlerEntry
-
-
class
fobi.admin.
FormWizardEntryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
FormWizardEntry admin.
-
FormWizardEntryAdmin.
fieldsets
= ((<django.utils.functional.__proxy__ object at 0x7f5a5f31f250>, {'fields': ('name', 'is_public', 'is_cloneable')}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f310>, {'fields': ('success_page_title', 'success_page_message'), 'classes': ('collapse',)}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f350>, {'fields': ('user',), 'classes': ('collapse',)}), (<django.utils.functional.__proxy__ object at 0x7f5a5f31f3d0>, {'fields': ('slug',), 'classes': ('collapse',)}))¶
-
FormWizardEntryAdmin.
inlines
= [<class 'fobi.admin.FormWizardFormEntryInlineAdmin'>, <class 'fobi.admin.FormWizardHandlerEntryInlineAdmin'>]¶
-
FormWizardEntryAdmin.
list_display
= ('name', 'slug', 'user', 'is_public', 'created', 'updated', 'is_cloneable')¶
-
FormWizardEntryAdmin.
list_editable
= ('is_public', 'is_cloneable')¶
-
FormWizardEntryAdmin.
list_filter
= ('is_public', 'is_cloneable')¶
-
FormWizardEntryAdmin.
media
¶
-
FormWizardEntryAdmin.
radio_fields
= {'user': 2}¶
-
FormWizardEntryAdmin.
readonly_fields
= ('slug',)¶
-
-
class
fobi.admin.
FormWizardFormEntryInlineAdmin
(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline
FormWizardFormEntry inline admin.
-
extra
= 0¶
-
fields
= ('form_entry', 'position')¶
-
media
¶
-
model
¶ alias of
FormWizardFormEntry
-
-
class
fobi.admin.
FormWizardHandlerAdmin
(model, admin_site)[source]¶ Bases:
fobi.admin.BasePluginModelAdmin
FormHandler admin.
-
actions
= [<function bulk_change_form_wizard_handler_plugins at 0x7f5a5e8a16e0>]¶
-
media
¶
-
-
class
fobi.admin.
FormWizardHandlerEntryInlineAdmin
(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline
FormWizardHandlerEntry inline admin.
-
extra
= 0¶
-
fields
= ('plugin_uid', 'plugin_data')¶
-
form
¶ alias of
FormWizardHandlerEntryForm
-
media
¶
-
model
¶ alias of
FormWizardHandlerEntry
-
fobi.app module¶
fobi.apps module¶
fobi.base module¶
Base module. All uids are supposed to be pythonic function names (see PEP http://www.python.org/dev/peps/pep-0008/#function-names).
-
fobi.base.
assemble_form_field_widget_class
(base_class, plugin)[source]¶ Assemble form field widget class.
Finish this or remove.
#TODO
-
class
fobi.base.
BaseFormFieldPluginForm
[source]¶ Bases:
fobi.base.BasePluginForm
Base form for form field plugins.
-
help_text
= <django.forms.fields.CharField object>¶
-
label
= <django.forms.fields.CharField object>¶
-
name
= <django.forms.fields.CharField object>¶
-
plugin_data_fields
= [('name', ''), ('label', ''), ('help_text', ''), ('required', False)]¶
-
required
= <django.forms.fields.BooleanField object>¶
-
-
class
fobi.base.
BasePlugin
(user=None)[source]¶ Bases:
object
Base plugin.
Base form field from which every form field should inherit.
Properties: - uid (string): Plugin uid (obligatory). Example value: ‘dummy’,
‘wysiwyg’, ‘news’.
- name (string): Plugin name (obligatory). Example value:
‘Dummy plugin’, ‘WYSIWYG’, ‘Latest news’.
- description (string): Plugin decription (optional). Example
value: ‘Dummy plugin used just for testing’.
- help_text (string): Plugin help text (optional). This text would
be shown in
fobi.views.add_form_plugin_entry
andfobi.views.edit_form_plugin_entry
views.
- form: Plugin form (optional). A subclass of
django.forms.Form
. Should be given in case plugin is configurable.
- form: Plugin form (optional). A subclass of
- add_form_template (str) (optional): Add form template (optional).
If given, overrides the
fobi.views.add_form_handler_entry default template.
- edit_form_template (string): Edit form template (optional). If
given, overrides the fobi.views.edit_form_handler_entry default template.
html_classes (list): List of extra HTML classes for the plugin.
- group (string): Plugin are grouped under the specified group.
Override in your plugin if necessary.
-
add_form_template
= None¶
-
clone_plugin_data
(entry)[source]¶ Clone plugin data.
Used when copying entries. If any objects or files are created by plugin, they should be cloned.
Parameters: fobi.models.AbstractPluginEntry – Instance of fobi.models.AbstractPluginEntry
.Return string: JSON dumped string of the cloned plugin data. The returned value would be inserted as is into the fobi.models.AbstractPluginEntry.plugin_data field.
-
delete_plugin_data
()[source]¶ Delete plugin data (internal method).
Used in
fobi.views.delete_form_entry
andfobi.views.delete_form_handler_entry
. Fired automatically, whenfobi.models.FormEntry
object is about to be deleted. Make use of it if your plugin creates database records or files that are not monitored externally but by fobi only.
-
description
= None¶
-
edit_form_template
= None¶
-
form
= None¶
-
get_cloned_plugin_data
(update={})[source]¶ Get cloned plugin data.
Get the cloned plugin data and returns it in a JSON dumped format.
Parameters: update (dict) – Return string: JSON dumped string of the cloned plugin data. Example: - In the
get_cloned_plugin_data
method of your plugin, do as - follows:
>>> def clone_plugin_data(self, dashboard_entry): >>> cloned_image = clone_file(self.data.image, relative_path=True) >>> return self.get_cloned_plugin_data( >>> update={'image': cloned_image} >>> )
- In the
-
get_form
()[source]¶ Get the plugin form class.
Override this method in your subclassed
fobi.base.BasePlugin
class when you need your plugin setup to vary depending on the placeholder, workspace, user or request given. By default returns the value of theform
attribute defined in your plugin.Return django.forms.Form|django.forms.ModelForm: Subclass of django.forms.Form
ordjango.forms.ModelForm
.
-
get_initialised_create_form
(data=None, files=None, initial_data=None)[source]¶ Get initialized create form.
Used
fobi.views.add_form_element_entry
andfobi.views.add_form_handler_entry
view to gets initialised form for object to be created.
-
get_initialised_create_form_or_404
(data=None, files=None)[source]¶ Get initialized create form or page 404.
Same as
get_initialised_create_form
but raisesdjango.http.Http404
on errors.
-
get_initialised_edit_form
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=':', empty_permitted=False, instance=None)[source]¶ Get initialized edit form.
Used in
fobi.views.edit_form_element_entry
andfobi.views.edit_form_handler_entry
views.
-
get_initialised_edit_form_or_404
(data=None, files=None, auto_id='id_%s', prefix=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=':', empty_permitted=False)[source]¶ Get initialized edit form or page 404.
Same as
get_initialised_edit_form
but raisesdjango.http.Http404
on errors.
-
get_plugin_form_data
()[source]¶ Get plugin form data.
Fed as
initial
argument to the plugin form when initialising the instance for adding or editing the plugin. Override in your plugin class if you need customisations.
-
get_updated_plugin_data
(update={})[source]¶ Get updated plugin data.
Returns it in a JSON dumped format.
Parameters: update (dict) – Return string: JSON dumped string of the cloned plugin data.
-
get_widget
(request=None, as_instance=False)[source]¶ Get the plugin widget.
Parameters: - request (django.http.HttpRequest) –
- as_instance (bool) –
Return mixed: Subclass of fobi.base.BasePluginWidget or instance of subclassed fobi.base.BasePluginWidget object.
-
group
= <django.utils.functional.__proxy__ object>¶
-
help_text
= None¶
-
html_class
¶ HTML class.
A massive work on positioning the plugin and having it to be displayed in a given width is done here. We should be getting the plugin widget for the plugin given and based on its’ properties (static!) as well as on plugin position (which we have from model), we can show the plugin with the exact class.
-
html_classes
= []¶
-
html_id
¶ HTML id.
-
load_plugin_data
(plugin_data)[source]¶ Load plugin data.
Load the plugin data saved in
fobi.models.FormElementEntry
orfobi.models.FormHandlerEntry
. Plugin data is saved in JSON string.Parameters: plugin_data (string) – JSON string with plugin data.
-
media_css
= []¶
-
media_js
= []¶
-
name
= None¶
-
plugin_data_repr
()[source]¶ Plugin data repr.
Human readable representation of plugin data. A very basic way would be just:
>>> return self.data.__dict__
Return string:
-
post_processor
()[source]¶ Post-processor (self).
Redefine in your subclassed plugin when necessary.
Post process plugin data here (before rendering). This method is being called after the data has been loaded into the plugin.
Note, that request (django.http.HttpRequest) is available (self.request).
-
pre_processor
()[source]¶ Pre-processor (callback).
Redefine in your subclassed plugin when necessary.
Pre process plugin data (before rendering). This method is being called before the data has been loaded into the plugin.
Note, that request (django.http.HttpRequest) is available ( self.request).
-
render
(request=None)[source]¶ Renders the plugin HTML.
Parameters: request (django.http.HttpRequest) – Return string:
-
storage
= None¶
-
uid
= None¶
-
update_plugin_data
(entry)[source]¶ Update plugin data.
Used in
fobi.management.commands.fobi_update_plugin_data
.Some plugins would contain data fetched from various sources (models, remote data). Since form entries are by definition loaded extremely much, you are advised to store as much data as possible in
plugin_data
field offobi.models.FormElementEntry
orfobi.models.FormHandlerEntry
. Some externally fetched data becomes invalid after some time and needs updating. For that purpose, in case if your plugin needs that, redefine this method in your plugin. If you need your data to be periodically updated, add a cron-job which would runfobi_update_plugin_data
management command (seefobi.management.commands.fobi_update_plugin_data
module).Parameters: or fobi.models.FormHandlerEntry (fobi.models.FormElementEntry) – Instance of fobi.models.FormeHandlerEntry
.Return dict: Should return a dictionary containing data of fields to be updated.
-
widget
= None¶
-
class
fobi.base.
BasePluginForm
[source]¶ Bases:
object
Not a form actually; defined for magic only.
Property iterable plugin_data_fields: Fields to get when calling the
get_plugin_data
method. These field will be JSON serialized. All other fields, even if they are part of the form, won’t be. Make sure all fields are serializable. If some of them aren’t, override thesave_plugin_data
method and make them serializable there. See fobi.contrib.plugins.form_elements.fields.select.forms as a good example.Example: >>> plugin_data_fields = ( >>> ('name', ''), >>> ('active': False) >>> )
-
get_plugin_data
(request=None, json_format=True)[source]¶ Get plugin data.
Data that would be saved in the
plugin_data
field of thefobi.models.FormElementEntry
or ``fobi.models.FormHandlerEntry`.` subclassed model.Parameters: request (django.http.HttpRequest) –
-
plugin_data_fields
= None¶
-
-
class
fobi.base.
BaseRegistry
[source]¶ Bases:
object
Base registry.
Registry of plugins. It’s essential, that class registered has the
uid
property.If
fail_on_missing_plugin
is set to True, an appropriate exception (plugin_not_found_exception_cls
) is raised in cases if plugin could’t be found in the registry.Property mixed type: Property bool fail_on_missing_plugin: Property fobi.exceptions.DoesNotExist plugin_not_found_exception_cls: Property str plugin_not_found_error_message: -
fail_on_missing_plugin
= False¶
-
get
(uid, default=None)[source]¶ Get the given entry from the registry.
Parameters: - uid (string) –
- default (mixed) –
:return mixed.
-
plugin_not_found_error_message
= "Can't find plugin with uid `{0}` in `{1}` registry."¶
-
plugin_not_found_exception_cls
¶ alias of
DoesNotExist
-
register
(cls, force=False)[source]¶ Registers the plugin in the registry.
Parameters: - cls (mixed) –
- force (bool) –
-
registry
¶ Shortcut to self._registry.
-
type
= None¶
-
-
fobi.base.
classproperty
¶ alias of
ClassProperty
-
fobi.base.
collect_plugin_media
(form_element_entries, request=None)[source]¶ Collect the plugin media for form element entries given.
Parameters: - form_element_entries (iterable) – Iterable of
fobi.models.FormElementEntry
instances. - request (django.http.HttpRequest) –
Return dict: Returns a dict containing the ‘js’ and ‘css’ keys. Correspondent values of those keys are lists containing paths to the CSS and JS media files.
- form_element_entries (iterable) – Iterable of
-
fobi.base.
ensure_autodiscover
()[source]¶ Ensure that plugins are auto-discovered.
The form callbacks registry is intentionally left out, since they will be auto-discovered in any case if other modules are discovered.
-
fobi.base.
fire_form_callbacks
(form_entry, request, form, stage=None)[source]¶ Fire form callbacks.
Parameters: - form_entry (fobi.models.FormEntry) –
- request (django.http.HttpRequest) –
- form (django.forms.Form) –
- stage (string) –
Return django.forms.Form form:
-
class
fobi.base.
FormCallback
[source]¶ Bases:
fobi.base.BaseFormCallback
Form callback.
-
callback
(form_entry, request, form)[source]¶ Callback.
Custom callback code should be implemented here.
Parameters: - form_entry (fobi.models.FormEntry) – Instance of
fobi.models.FormEntry
. - request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_entry (fobi.models.FormEntry) – Instance of
-
-
class
fobi.base.
FormCallbackRegistry
[source]¶ Bases:
object
Registry of callbacks.
Holds callbacks for stages listed in the
fobi.constants.CALLBACK_STAGES
.
-
class
fobi.base.
FormElementPlugin
(user=None)[source]¶ Bases:
fobi.base.BasePlugin
Base form element plugin.
Property fobi.base.FormElementPluginDataStorage storage: Property bool has_value: If set to False, ignored (removed) from the POST when processing the form. -
get_custom_field_instances
(integrate_with, request=None, form_entry=None, form_element_entries=None, has_value=None, **kwargs)[source]¶ Get custom field instances.
Parameters: - integrate_with (str) –
- request (django.http.HttpRequest) –
- form_entry –
- form_element_entries –
- has_value (bool) – If not None, used for filtering out.
Return list:
-
get_form_field_instances
(request=None, form_entry=None, form_element_entries=None, **kwargs)[source]¶ Get the instances of form fields, that plugin contains.
Parameters: - request (django.http.HttpRequest) –
- form_entry (fobi.models.FormEntry) –
- form_element_entries (django.db.models.QuerySet) – Queryset of
fobi.models.FormElementEntry
instances.
Return list: List of Django form field instances.
Example: >>> from django.forms.fields import CharField, IntegerField, TextField >>> [CharField(max_length=100), IntegerField(), TextField()]
-
get_origin_kwargs_update_func_results
(kwargs_update_func, form_element_entry, origin, extra={}, widget_cls=None)[source]¶ Get origin kwargs update func results.
If
kwargs_update_func
is given, is callable and returns results without failures, return the result. Otherwise - return None.
-
get_origin_return_func_results
(return_func, form_element_entry, origin)[source]¶ Get origin return func results.
If
return_func
is given, is callable and returns results without failures, return the result. Otherwise - return None.
-
has_value
= False¶
-
storage
¶ alias of
FormElementPluginDataStorage
-
submit_plugin_form_data
(form_entry, request, form, form_element_entries=None, **kwargs)[source]¶ Submit plugin form data.
Called on form submission (when user actually posts the data to assembled form).
Parameters: - form_entry (fobi.models.FormEntry) – Instance of
fobi.models.FormEntry
. - request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_element_entries (iterable) –
- form_entry (fobi.models.FormEntry) – Instance of
-
-
class
fobi.base.
FormElementPluginDataStorage
[source]¶ Bases:
fobi.base.BaseDataStorage
Storage for FormElementPlugin data.
-
class
fobi.base.
FormElementPluginRegistry
[source]¶ Bases:
fobi.base.BaseRegistry
Form element plugins registry.
-
fail_on_missing_plugin
= True¶
-
plugin_not_found_exception_cls
¶ alias of
FormElementPluginDoesNotExist
-
type
= (<class 'fobi.base.FormElementPlugin'>, <class 'fobi.base.FormFieldPlugin'>)¶
-
-
class
fobi.base.
FormElementPluginWidget
(plugin)[source]¶ Bases:
fobi.base.BasePluginWidget
Form element plugin widget.
-
storage
¶ alias of
FormElementPluginWidgetDataStorage
-
-
class
fobi.base.
FormElementPluginWidgetRegistry
[source]¶ Bases:
fobi.base.BasePluginWidgetRegistry
Registry of form element plugins.
-
type
¶ alias of
FormElementPluginWidget
-
-
class
fobi.base.
FormFieldPlugin
(user=None)[source]¶ Bases:
fobi.base.FormElementPlugin
Form field plugin.
-
has_value
= True¶
-
-
class
fobi.base.
FormHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.BasePlugin
Form handler plugin.
Property fobi.base.FormHandlerPluginDataStorage storage: Property bool allow_multiple: If set to True, plugin can be used multiple times within (per form). Otherwise - just once. -
allow_multiple
= True¶
-
custom_actions
(form_entry, request=None)[source]¶ Custom actions.
Override this method in your form handler if you want to specify custom actions. Note, that expected return value of this method is an iterable with a triple, where the first item is the URL of the action and the second item is the action title and the third item is the icon class of the action.
Example: >>> return ( >>> ('/add-to-favorites/', >>> 'Add to favourites', >>> 'glyphicon glyphicon-favourties'), >>> )
-
get_custom_actions
(form_entry, request=None)[source]¶ Internal method to for obtaining the
get_custom_actions
.
-
run
(form_entry, request, form, form_element_entries=None)[source]¶ Run.
Custom code should be implemented here.
Parameters: - form_entry (fobi.models.FormEntry) – Instance of
fobi.models.FormEntry
. - request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_element_entries (iterable) – Iterable of
fobi.models.FormElementEntry
objects.
Return mixed: May be a tuple (bool, mixed) or None
- form_entry (fobi.models.FormEntry) – Instance of
-
run_integration_handler
(integrate_with, form_entry, request, form_element_entries=None, **kwargs)[source]¶ Run integration handler.
-
storage
¶ alias of
FormHandlerPluginDataStorage
-
-
class
fobi.base.
FormHandlerPluginDataStorage
[source]¶ Bases:
fobi.base.BaseDataStorage
Storage for FormHandlerPlugin data.
-
class
fobi.base.
FormHandlerPluginRegistry
[source]¶ Bases:
fobi.base.BaseRegistry
Form handler plugins registry.
-
fail_on_missing_plugin
= True¶
-
plugin_not_found_exception_cls
¶ alias of
FormHandlerPluginDoesNotExist
-
type
¶ alias of
FormHandlerPlugin
-
-
class
fobi.base.
FormHandlerPluginWidget
(plugin)[source]¶ Bases:
fobi.base.BasePluginWidget
Form handler plugin widget.
-
storage
¶ alias of
FormHandlerPluginWidgetDataStorage
-
-
class
fobi.base.
FormHandlerPluginWidgetRegistry
[source]¶ Bases:
fobi.base.BasePluginWidgetRegistry
Registry of form handler plugins.
-
type
¶ alias of
FormHandlerPluginWidget
-
-
class
fobi.base.
FormWizardHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.BasePlugin
Form wizard handler plugin.
Property fobi.base.FormWizardHandlerPluginDataStorage storage: Property bool allow_multiple: If set to True, plugin can be used multiple times within (per form). Otherwise - just once. DONE
-
allow_multiple
= True¶
-
custom_actions
(form_wizard_entry, request=None)[source]¶ Custom actions.
Override this method in your form handler if you want to specify custom actions. Note, that expected return value of this method is an iterable with a triple, where the first item is the URL of the action and the second item is the action title and the third item is the icon class of the action.
Example: >>> return ( >>> ('/add-to-favorites/', >>> 'Add to favourites', >>> 'glyphicon glyphicon-favourties'), >>> )
-
get_custom_actions
(form_wizard_entry, request=None)[source]¶ Internal method to for obtaining the
get_custom_actions
.
-
run
(form_wizard_entry, request, form_list, form_wizard, form_element_entries=None)[source]¶ Run.
Custom code should be implemented here.
Parameters: - form_wizard_entry (fobi.models.FormEntry) – Instance of
fobi.models.FormEntry
. - request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_element_entries (iterable) – Iterable of
fobi.models.FormElementEntry
objects.
Return mixed: May be a tuple (bool, mixed) or None
- form_wizard_entry (fobi.models.FormEntry) – Instance of
-
storage
¶ alias of
FormWizardHandlerPluginDataStorage
-
-
class
fobi.base.
FormWizardHandlerPluginDataStorage
[source]¶ Bases:
fobi.base.BaseDataStorage
Storage for FormWizardHandlerPlugin handler data.
-
class
fobi.base.
FormWizardHandlerPluginRegistry
[source]¶ Bases:
fobi.base.BaseRegistry
Form wizard handler plugins registry.
-
fail_on_missing_plugin
= True¶
-
plugin_not_found_exception_cls
¶ alias of
FormWizardHandlerPluginDoesNotExist
-
type
¶ alias of
FormWizardHandlerPlugin
-
-
class
fobi.base.
FormWizardHandlerPluginWidget
(plugin)[source]¶ Bases:
fobi.base.BasePluginWidget
Form wizard handler plugin widget.
-
storage
¶ alias of
FormWizardHandlerPluginWidgetDataStorage
-
-
class
fobi.base.
FormWizardHandlerPluginWidgetRegistry
[source]¶ Bases:
fobi.base.BasePluginWidgetRegistry
Registry of form wizard handler plugins.
-
type
¶ alias of
FormWizardHandlerPluginWidget
-
-
fobi.base.
get_form_element_plugin_widget
(plugin_uid, request=None, as_instance=False, theme=None)[source]¶ Get the form element plugin widget for the
plugin_uid
given.Parameters: - plugin_uid (str) – UID of the plugin to get the widget for.
- request (django.http.HttpRequest) –
- as_instance (bool) –
- theme (fobi.base.BaseTheme) – Subclass of.
Return BasePluginWidget: Subclass of.
-
fobi.base.
get_form_handler_plugin_widget
(plugin_uid, request=None, as_instance=False, theme=None)[source]¶ Get the form handler plugin widget for the
plugin_uid
given.Parameters: - plugin_uid (str) – UID of the plugin to get the widget for.
- request (django.http.HttpRequest) –
- as_instance (bool) –
- theme (fobi.base.BaseTheme) – Subclass of.
Return BasePluginWidget: Subclass of.
-
fobi.base.
get_form_wizard_handler_plugin_widget
(plugin_uid, request=None, as_instance=False, theme=None)[source]¶ Get the form wizard handler plugin widget for the
plugin_uid
given.Parameters: - plugin_uid (str) – UID of the plugin to get the widget for.
- request (django.http.HttpRequest) –
- as_instance (bool) –
- theme (fobi.base.BaseTheme) – Subclass of.
Return BasePluginWidget: Subclass of.
-
fobi.base.
get_ordered_form_handlers
()¶ Get ordered form handler plugins.
Gets form handler plugins in the execution order as a sortable dictionary, which can be later on used to add real plugins to be executed.
Return fobi.data_structures.SortableDict:
-
fobi.base.
get_ordered_form_wizard_handlers
()¶ Get ordered form wizard_handler plugins.
Gets form wizard handler plugins in the execution order as a sortable dictionary, which can be later on used to add real plugins to be executed.
Return fobi.data_structures.SortableDict:
-
fobi.base.
get_plugin_widget
(registry, plugin_uid, request=None, as_instance=False, theme=None)[source]¶ Get the plugin widget for the
plugin_uid
given.Looks up in the
registry
provided.Parameters: - registry (fobi.base.BasePluginWidgetRegistry) – Subclass of.
- plugin_uid (str) – UID of the plugin to get the widget for.
- request (django.http.HttpRequest) –
- as_instance (bool) –
- theme (fobi.base.BaseTheme) – Subclass of.
Return BasePluginWidget: Subclass of.
-
fobi.base.
get_processed_form_data
(form, form_element_entries)[source]¶ Gets processed form data.
Simply fires both
fobi.base.get_cleaned_data
andfobi.base.get_field_name_to_label_map
functions and returns the result.Parameters: - form (django.forms.Form) –
- form_element_entries (iterable) – Iterable of form element entries.
Return tuple:
-
fobi.base.
get_processed_form_wizard_data
(form_wizard, form_list, form_element_entries)[source]¶ Get processed form wizard data.
-
fobi.base.
get_registered_form_callbacks
(stage=None)[source]¶ Get registered form callbacks for the stage given.
-
fobi.base.
get_registered_form_element_plugin_uids
(flattern=True)[source]¶ Get registered form element plugin uids.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_form_element_plugins
()[source]¶ Get registered form element plugins.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_form_handler_plugin_uids
(flattern=True)[source]¶ Get registered form handler plugin uids.
Gets a list of UIDs of registered form handler plugins. If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_form_handler_plugins
(as_instances=False)[source]¶ Get registered form handler plugins.
Gets a list of registered plugins in a form of tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_form_wizard_handler_plugin_uids
(flattern=True)[source]¶ Get registered form handler plugin uids.
Gets a list of UIDs of registered form wizard handler plugins. If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_form_wizard_handler_plugins
(as_instances=False)[source]¶ Get registered form handler wizard plugins.
Gets a list of registered plugins in a form of tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_integration_form_element_plugin_uids
(flattern=True)[source]¶ Get registered custom field instance plugin uids.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_integration_form_element_plugins
()[source]¶ Get registered custom field instance plugins.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_integration_form_element_plugins_grouped
()[source]¶ Get registered custom field instance plugins grouped.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return dict:
-
fobi.base.
get_registered_integration_form_handler_plugin_uids
(flattern=True)[source]¶ Get registered integration form handler plugin uids.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_integration_form_handler_plugins
()[source]¶ Get registered integration form handler plugins.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_integration_form_handler_plugins_grouped
()[source]¶ Get registered integration form handler plugins grouped.
Gets a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return dict:
-
fobi.base.
get_registered_plugin_uids
(registry, flattern=True, sort_items=True)[source]¶ Get a list of registered plugin uids as a list .
If not yet auto-discovered, auto-discovers them.
The sort_items is applied only if flattern is True.
Parameters: - registry –
- flattern (bool) –
- sort_items (bool) –
Return list:
-
fobi.base.
get_registered_plugins
(registry, as_instances=False, sort_items=True)[source]¶ Get registered plugins.
Get a list of registered plugins in a form if tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Parameters: - registry –
- as_instances (bool) –
- sort_items (bool) –
Return list:
-
fobi.base.
get_registered_theme_uids
(flattern=True)[source]¶ Get registered theme uids.
Gets a list of registered themes in a form of tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
fobi.base.
get_registered_themes
()[source]¶ Get registered themes.
Gets a list of registered themes in form of tuple (plugin name, plugin description). If not yet auto-discovered, auto-discovers them.
Return list:
-
class
fobi.base.
IntegrationFormElementPlugin
(user=None)[source]¶ Bases:
fobi.base.BasePlugin
Base custom field instance plugin for integration.
-
has_value
= False¶
-
storage
¶
-
-
class
fobi.base.
IntegrationFormElementPluginDataStorage
[source]¶ Bases:
fobi.base.BaseDataStorage
Storage for IntegrationFormElementPlugin.
-
class
fobi.base.
IntegrationFormElementPluginProcessor
(*args, **kwargs)[source]¶ Bases:
object
Custom form field instance processor.
Supposed to have implemented a single method called
process_custom_form_field_instance
.
-
class
fobi.base.
IntegrationFormElementPluginRegistry
[source]¶ Bases:
fobi.base.BaseIntegrationPluginRegistry
Integration form element plugin registry.
-
fail_on_missing_plugin
= False¶
-
plugin_not_found_exception_cls
¶ alias of
IntegrationFormElementPluginDoesNotExist
-
type
= (<class 'fobi.base.IntegrationFormElementPlugin'>,)¶
-
-
class
fobi.base.
IntegrationFormFieldPlugin
(user=None)[source]¶ Bases:
fobi.base.IntegrationFormElementPlugin
Integration form field plugin for custom field instances.
-
has_value
= True¶
-
-
class
fobi.base.
IntegrationFormHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.BasePlugin
Base integration form handler plugin for integration.
-
has_value
= True¶
-
storage
¶
-
-
class
fobi.base.
IntegrationFormHandlerPluginDataStorage
[source]¶ Bases:
fobi.base.BaseDataStorage
Storage for IntegrationFormHandlerPlugin.
-
class
fobi.base.
IntegrationFormHandlerPluginRegistry
[source]¶ Bases:
fobi.base.BaseIntegrationPluginRegistry
Integration form handler plugin registry.
-
fail_on_missing_plugin
= False¶
-
plugin_not_found_exception_cls
¶ alias of
IntegrationFormHandlerPluginDoesNotExist
-
type
= (<class 'fobi.base.IntegrationFormHandlerPlugin'>,)¶
-
-
class
fobi.base.
IntegrationFormCallbackRegistry
[source]¶ Bases:
object
Registry of callbacks for integration plugins.
Holds callbacks for stages listed in the
fobi.constants.CALLBACK_STAGES
.-
get_callbacks
(integrate_with, stage=None)[source]¶ Get callbacks for the stage given.
Parameters: - integrate_with (str) –
- stage (string) –
Return list:
-
registry
¶
-
-
class
fobi.base.
IntegrationFormCallback
[source]¶ Bases:
object
Integration form callback.
-
callback
(form_entry, request, **kwargs)[source]¶ Callback.
Custom callback code should be implemented here.
Parameters: - form_entry (fobi.models.FormEntry) – Instance of
fobi.models.FormEntry
. - request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_entry (fobi.models.FormEntry) – Instance of
-
integrate_with
= None¶
-
-
fobi.base.
run_form_handlers
(form_entry, request, form, form_element_entries=None)[source]¶ Run form handlers.
Parameters: - form_entry (fobi.models.FormEntry) –
- request (django.http.HttpRequest) –
- form (django.forms.Form) –
- form_element_entries (iterable) –
Return tuple: List of success responses, list of error responses
-
fobi.base.
run_form_wizard_handlers
(form_wizard_entry, request, form_list, form_wizard, form_element_entries=None)[source]¶ Run form wizard handlers.
Parameters: - form_wizard_entry (fobi.models.FormWizardEntry) –
- request (django.http.HttpRequest) –
- form_list (list) – List of
django.forms.Form
objects. - form_wizard (fobi.wizard.views.dynamic.DynamicWizardView) – The form wizard view object.
- form_element_entries (iterable) – Iterable
of
fobi.base.FormElementEntry
objects.
Return tuple: List of success responses, list of error responses
-
fobi.base.
validate_form_element_plugin_uid
(plugin_uid)[source]¶ Validate the form element plugin uid.
Parameters: plugin_uid (string) – Return bool:
-
fobi.base.
validate_form_handler_plugin_uid
(plugin_uid)[source]¶ Validate the plugin uid.
Parameters: plugin_uid (string) – Return bool:
-
fobi.base.
validate_form_wizard_handler_plugin_uid
(plugin_uid)[source]¶ Validate the plugin uid.
Parameters: plugin_uid (string) – Return bool:
-
fobi.base.
validate_integration_form_element_plugin_uid
(plugin_uid)[source]¶ Validate the custom field instance plugin uid.
Parameters: plugin_uid (string) – Return bool:
fobi.conf module¶
-
fobi.conf.
get_setting
(setting, override=None)[source]¶ Get setting.
Get a setting from fobi conf module, falling back to the default.
If override is not None, it will be used instead of the setting.
Parameters: - setting – String with setting name
- override – Value to use when no setting is available. Defaults to None.
Returns: Setting value.
fobi.constants module¶
fobi.context_processors module¶
fobi.data_structures module¶
-
class
fobi.data_structures.
SortableDict
(data=None)[source]¶ Bases:
dict
SortableDict.
A dictionary that keeps its keys in the order in which they’re inserted. Very similar to (and partly based on)
SortedDict
of theDjango
, but has several additional methods implemented, such as:insert_before_key
andinsert_after_key
.-
insert
(index, key, value)[source]¶ Inserts the key, value pair before the item with the given index.
-
insert_after_key
(target_key, key, value, fail_silently=True)[source]¶ Insert the {
key
:value
} after thetarget_key
.Parameters: - target_key (immutable) –
- key (immutable) –
- value (mutable) –
- fail_silently (boolean) –
- offset (int) –
Return bool:
-
insert_before_key
(target_key, key, value, fail_silently=True, offset=0)[source]¶ Insert the {
key
:value
} before thetarget_key
.Parameters: - target_key (immutable) –
- key (immutable) –
- value (mutable) –
- fail_silently (boolean) –
- offset (int) –
Return bool:
-
iteritems
()¶ Iter items (internal method).
-
iterkeys
()¶
-
itervalues
()¶ Iter values (internal method).
-
move_after_key
(source_key, target_key, fail_silently=True)[source]¶ Move the {
key
:value
} after the givensource_key
.Parameters: - source_key (immutable) –
- target_key (immutable) –
- fail_silently (boolean) –
Return bool:
-
fobi.decorators module¶
-
fobi.decorators.
permissions_required
(perms, satisfy='all', login_url=None, raise_exception=False)[source]¶ Check for the permissions given based on the strategy chosen.
Parameters: - perms (iterable) –
- satisfy (string) – Allowed values are “all” and “any”.
- login_url (string) –
- raise_exception (bool) – If set to True, the
PermissionDenied
exception is raised on failures.
Return bool: Example: >>> @login_required >>> @permissions_required(satisfy='any', perms=[ >>> 'fobi.add_formentry', >>> 'fobi.change_formentry', >>> 'fobi.delete_formentry', >>> 'fobi.add_formelemententry', >>> 'fobi.change_formelemententry', >>> 'fobi.delete_formelemententry', >>> ]) >>> def edit_dashboard(request): >>> # your code
-
fobi.decorators.
all_permissions_required
(perms, login_url=None, raise_exception=False)[source]¶ Check for the permissions given based on SATISFY_ALL strategy chosen.
Example: >>> @login_required >>> @all_permissions_required([ >>> 'fobi.add_formentry', >>> 'fobi.change_formentry', >>> 'fobi.delete_formentry', >>> 'fobi.add_formelemententry', >>> 'fobi.change_formelemententry', >>> 'fobi.delete_formelemententry', >>> ]) >>> def edit_dashboard(request): >>> # your code
-
fobi.decorators.
any_permission_required
(perms, login_url=None, raise_exception=False)[source]¶ Check for the permissions given based on SATISFY_ANY strategy chosen.
Example: >>> @login_required >>> @any_permission_required([ >>> 'fobi.add_formentry', >>> 'fobi.change_formentry', >>> 'fobi.delete_formentry', >>> 'fobi.add_formelemententry', >>> 'fobi.change_formelemententry', >>> 'fobi.delete_formelemententry', >>> ]) >>> def edit_dashboard(request): >>> # your code
fobi.defaults module¶
fobi.discover module¶
fobi.dynamic module¶
-
fobi.dynamic.
assemble_form_class
(form_entry, base_class=<class 'django.forms.forms.BaseForm'>, request=None, origin=None, origin_kwargs_update_func=None, origin_return_func=None, form_element_entries=None, get_form_field_instances_kwargs={})[source]¶ Assemble a form class by given entry.
Parameters: - form_entry –
- base_class –
- request (django.http.HttpRequest) –
- origin (string) –
- origin_kwargs_update_func (callable) –
- origin_return_func (callable) –
- form_element_entries (iterable) – If given, used instead of
form_entry.formelemententry_set.all
(no additional database hit). - get_form_field_instances_kwargs (dict) – To be passed as **kwargs to the :method:`get_form_field_instances_kwargs`.
fobi.exceptions module¶
-
exception
fobi.exceptions.
DoesNotExist
[source]¶ Bases:
fobi.exceptions.BaseException
Raised when something does not exist.
-
exception
fobi.exceptions.
FormCallbackError
[source]¶ Bases:
fobi.exceptions.FormPluginError
Raised when form callback error occurs.
-
exception
fobi.exceptions.
FormElementPluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.PluginDoesNotExist
Raised when no form element plugin with given uid can be found.
-
exception
fobi.exceptions.
FormElementPluginError
[source]¶ Bases:
fobi.exceptions.FormPluginError
Raised when form element plugin error occurs.
-
exception
fobi.exceptions.
FormHandlerPluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.PluginDoesNotExist
Raised when no form handler plugin with given uid can be found.
-
exception
fobi.exceptions.
FormHandlerPluginError
[source]¶ Bases:
fobi.exceptions.FormPluginError
Raised when form handler plugin error occurs.
-
exception
fobi.exceptions.
FormPluginError
[source]¶ Bases:
fobi.exceptions.BaseException
Base error for form elements and handlers.
-
exception
fobi.exceptions.
FormWizardHandlerPluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.PluginDoesNotExist
FormWizardHandlerPlugin does not exist.
Raised when no form wizard handler plugin with given uid can be found.
-
exception
fobi.exceptions.
ImproperlyConfigured
[source]¶ Bases:
fobi.exceptions.BaseException
Improperly configured.
Exception raised when developer didn’t configure/write the code properly.
-
exception
fobi.exceptions.
IntegrationFormElementPluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.PluginDoesNotExist
If integration form element plugin with given uid can’t be found.
-
exception
fobi.exceptions.
IntegrationFormHandlerPluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.PluginDoesNotExist
If integration form handler plugin with given uid can’t be found.
-
exception
fobi.exceptions.
InvalidRegistryItemType
[source]¶ Bases:
exceptions.ValueError
,fobi.exceptions.BaseException
Invalid registry item type.
Raised when an attempt is made to register an item in the registry which does not have a proper type.
-
exception
fobi.exceptions.
NoDefaultThemeSet
[source]¶ Bases:
fobi.exceptions.ImproperlyConfigured
Raised when no active theme is chosen.
-
exception
fobi.exceptions.
PluginDoesNotExist
[source]¶ Bases:
fobi.exceptions.DoesNotExist
Raised when no plugin with given uid can be found.
-
exception
fobi.exceptions.
ThemeDoesNotExist
[source]¶ Bases:
fobi.exceptions.DoesNotExist
Raised when no theme with given uid can be found.
fobi.form_importers module¶
-
class
fobi.form_importers.
BaseFormImporter
(form_entry_cls, form_element_entry_cls, form_properties=None, form_data=None)[source]¶ Bases:
object
Base importer.
-
description
= None¶
-
field_properties_mapping
= None¶
-
field_type_prop_name
= None¶
-
fields_mapping
= None¶
-
name
= None¶
-
position_prop_name
= None¶
-
templates
= None¶
-
uid
= None¶
-
wizard
= None¶
-
-
class
fobi.form_importers.
FormImporterPluginRegistry
[source]¶ Bases:
fobi.base.BaseRegistry
Form importer plugins registry.
-
type
¶ alias of
BaseFormImporter
-
fobi.form_utils module¶
fobi.forms module¶
-
class
fobi.forms.
BulkChangeFormElementPluginsForm
(*args, **kwargs)[source]¶ Bases:
fobi.forms.BaseBulkChangePluginsForm
Bulk change form element plugins form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ['groups', 'groups_action', 'users', 'users_action']¶
-
model
¶ alias of
FormElement
-
-
BulkChangeFormElementPluginsForm.
base_fields
= OrderedDict([('groups', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9550>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>), ('users', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9390>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>)])¶
-
BulkChangeFormElementPluginsForm.
declared_fields
= OrderedDict([('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>)])¶
-
BulkChangeFormElementPluginsForm.
media
¶
-
class
-
class
fobi.forms.
BulkChangeFormHandlerPluginsForm
(*args, **kwargs)[source]¶ Bases:
fobi.forms.BaseBulkChangePluginsForm
Bulk change form handler plugins form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ['groups', 'groups_action', 'users', 'users_action']¶
-
model
¶ alias of
FormHandler
-
-
BulkChangeFormHandlerPluginsForm.
base_fields
= OrderedDict([('groups', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9910>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>), ('users', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9750>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>)])¶
-
BulkChangeFormHandlerPluginsForm.
declared_fields
= OrderedDict([('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>)])¶
-
BulkChangeFormHandlerPluginsForm.
media
¶
-
class
-
class
fobi.forms.
BulkChangeFormWizardHandlerPluginsForm
(*args, **kwargs)[source]¶ Bases:
fobi.forms.BaseBulkChangePluginsForm
Bulk change form wizard handler plugins form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ['groups', 'groups_action', 'users', 'users_action']¶
-
model
¶ alias of
FormWizardHandler
-
-
BulkChangeFormWizardHandlerPluginsForm.
base_fields
= OrderedDict([('groups', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9cd0>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>), ('users', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e8a9b10>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>)])¶
-
BulkChangeFormWizardHandlerPluginsForm.
declared_fields
= OrderedDict([('selected_plugins', <django.forms.fields.CharField object at 0x7f5a5e899c90>), ('users_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a90d0>), ('groups_action', <django.forms.fields.ChoiceField object at 0x7f5a5e8a9210>)])¶
-
BulkChangeFormWizardHandlerPluginsForm.
media
¶
-
class
-
fobi.forms.
FormElementEntryFormSet
¶ alias of
FormElementEntryFormFormSet
-
class
fobi.forms.
FormEntryForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
Form for
fobi.models.FormEntry
model.-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('name', 'title', 'is_public', 'success_page_title', 'success_page_message', 'action')¶
-
model
¶ alias of
FormEntry
-
-
FormEntryForm.
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7f5a5f2fb750>), ('title', <django.forms.fields.CharField object at 0x7f5a5f2fb050>), ('is_public', <django.forms.fields.BooleanField object at 0x7f5a5f2fb150>), ('success_page_title', <django.forms.fields.CharField object at 0x7f5a5f2fb210>), ('success_page_message', <django.forms.fields.CharField object at 0x7f5a5f2fb6d0>), ('action', <django.forms.fields.CharField object at 0x7f5a5f2844d0>)])¶
-
FormEntryForm.
declared_fields
= OrderedDict()¶
-
FormEntryForm.
media
¶
-
class
-
class
fobi.forms.
FormFieldsetEntryForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
Form for
fobi.models.FormFieldsetEntry
model.-
FormFieldsetEntryForm.
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7f5a5f284790>)])¶
-
FormFieldsetEntryForm.
declared_fields
= OrderedDict()¶
-
FormFieldsetEntryForm.
media
¶
-
-
class
fobi.forms.
FormHandlerEntryForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm
FormHandlerEntry form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('form_entry', 'plugin_data', 'plugin_uid')¶
-
model
¶ alias of
FormHandlerEntry
-
-
FormHandlerEntryForm.
base_fields
= OrderedDict([('form_entry', <django.forms.models.ModelChoiceField object at 0x7f5a5e905e10>), ('plugin_data', <django.forms.fields.CharField object at 0x7f5a5e905d90>), ('plugin_uid', <django.forms.fields.ChoiceField object at 0x7f5a5e9058d0>)])¶
-
FormHandlerEntryForm.
declared_fields
= OrderedDict([('plugin_uid', <django.forms.fields.ChoiceField object at 0x7f5a5e9058d0>)])¶
-
FormHandlerEntryForm.
media
¶
-
class
-
class
fobi.forms.
FormHandlerForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm
FormHandler form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('users', 'groups')¶
-
model
¶ alias of
FormHandler
-
-
FormHandlerForm.
base_fields
= OrderedDict([('users', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e905950>), ('groups', <django.forms.models.ModelMultipleChoiceField object at 0x7f5a5e905b10>)])¶
-
FormHandlerForm.
declared_fields
= OrderedDict()¶
-
FormHandlerForm.
media
¶
-
class
-
class
fobi.forms.
FormWizardEntryForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
Form for
fobi.models.FormWizardEntry
model.-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('name', 'title', 'is_public', 'success_page_title', 'success_page_message', 'show_all_navigation_buttons')¶
-
model
¶ alias of
FormWizardEntry
-
-
FormWizardEntryForm.
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7f5a5e899790>), ('title', <django.forms.fields.CharField object at 0x7f5a5e899890>), ('is_public', <django.forms.fields.BooleanField object at 0x7f5a5e899990>), ('success_page_title', <django.forms.fields.CharField object at 0x7f5a5e899a10>), ('success_page_message', <django.forms.fields.CharField object at 0x7f5a5e899b50>), ('show_all_navigation_buttons', <django.forms.fields.BooleanField object at 0x7f5a5e899bd0>)])¶
-
FormWizardEntryForm.
declared_fields
= OrderedDict()¶
-
FormWizardEntryForm.
media
¶
-
class
-
class
fobi.forms.
FormWizardFormEntryForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm
FormWizardFormEntryForm form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('form_wizard_entry', 'form_entry')¶
-
model
¶ alias of
FormWizardFormEntry
-
-
FormWizardFormEntryForm.
base_fields
= OrderedDict([('form_wizard_entry', <django.forms.models.ModelChoiceField object at 0x7f5a5e899110>), ('form_entry', <django.forms.models.ModelChoiceField object at 0x7f5a5e8992d0>)])¶
-
FormWizardFormEntryForm.
declared_fields
= OrderedDict()¶
-
FormWizardFormEntryForm.
media
¶
-
class
-
fobi.forms.
FormWizardFormEntryFormSet
¶ alias of
FormWizardFormEntryFormFormSet
-
class
fobi.forms.
FormWizardHandlerEntryForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm
FormWizardHandlerEntry form.
-
class
Meta
[source]¶ Bases:
object
Meta class.
-
fields
= ('form_wizard_entry', 'plugin_data', 'plugin_uid')¶
-
model
¶ alias of
FormWizardHandlerEntry
-
-
FormWizardHandlerEntryForm.
base_fields
= OrderedDict([('form_wizard_entry', <django.forms.models.ModelChoiceField object at 0x7f5a5e899e10>), ('plugin_data', <django.forms.fields.CharField object at 0x7f5a5e899d90>), ('plugin_uid', <django.forms.fields.ChoiceField object at 0x7f5a5e8996d0>)])¶
-
FormWizardHandlerEntryForm.
declared_fields
= OrderedDict([('plugin_uid', <django.forms.fields.ChoiceField object at 0x7f5a5e8996d0>)])¶
-
FormWizardHandlerEntryForm.
media
¶
-
class
-
class
fobi.forms.
ImportFormEntryForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None)[source]¶ Bases:
django.forms.forms.Form
Import form entry form.
-
base_fields
= OrderedDict([('file', <django.forms.fields.FileField object at 0x7f5a5e8a9e10>)])¶
-
declared_fields
= OrderedDict([('file', <django.forms.fields.FileField object at 0x7f5a5e8a9e10>)])¶
-
media
¶
-
-
class
fobi.forms.
ImportFormWizardEntryForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None)[source]¶ Bases:
fobi.forms.ImportFormEntryForm
Import form entry wizard form.
-
base_fields
= OrderedDict([('file', <django.forms.fields.FileField object at 0x7f5a5e8a9e10>)])¶
-
declared_fields
= OrderedDict([('file', <django.forms.fields.FileField object at 0x7f5a5e8a9e10>)])¶
-
media
¶
-
fobi.helpers module¶
Helpers module. This module can be safely imported from any fobi (sub)module, since it never imports from any of the fobi (sub)modules (except for the fobi.constants and fobi.exceptions modules).
-
fobi.helpers.
admin_change_url
(app_label, module_name, object_id, extra_path='', url_title=None)[source]¶ Gets an admin change URL for the object given.
Parameters: - app_label (str) –
- module_name (str) –
- object_id (int) –
- extra_path (str) –
- url_title (str) – If given, an HTML a tag is returned with url_title as the tag title. If left to None just the URL string is returned.
Return str:
-
fobi.helpers.
clean_dict
(source, keys=[], values=[])[source]¶ Removes given keys and values from dictionary.
Parameters: - source (dict) –
- keys (iterable) –
- values (iterable) –
Return dict:
-
fobi.helpers.
clone_file
(upload_dir, source_filename, relative_path=True)[source]¶ Clones the file.
Parameters: source_filename (string) – Source filename. Return string: Filename of the cloned file.
-
fobi.helpers.
combine_dicts
(headers, data)[source]¶ Combine dicts.
Takes two dictionaries, assuming one contains a mapping keys to titles and another keys to data. Joins as string and returns a result dict.
-
fobi.helpers.
ensure_unique_filename
(destination)[source]¶ Makes sure filenames are never overwritten.
Parameters: destination (string) – Return string:
-
fobi.helpers.
flatatt_inverse_quotes
(attrs)[source]¶ Convert a dictionary of attributes to a single string.
The returned string will contain a leading space followed by key=”value”, XML-style pairs. In the case of a boolean value, the key will appear without a value. It is assumed that the keys do not need to be XML-escaped. If the passed dictionary is empty, then return an empty string.
The result is passed through ‘mark_safe’ (by way of ‘format_html_join’).
-
fobi.helpers.
get_app_label_and_model_name
(path)[source]¶ Gets app_label and model_name from the path given.
Parameters: path (str) – Dotted path to the model (without ”.model”, as stored in the Django ContentType model. Return tuple: app_label, model_name
-
fobi.helpers.
get_form_element_entries_for_form_wizard_entry
(form_wizard_entry)[source]¶ Get form element entries for the form wizard entry.
-
fobi.helpers.
get_model_name_for_object
(obj)[source]¶ Get model name for object.
Django version agnostic.
-
fobi.helpers.
get_registered_models
(ignore=[])[source]¶ Gets registered models as list.
Parameters: ignore (iterable) – Ignore the following content types (should be in app_label.model
format (exampleauth.User
).Return list:
-
fobi.helpers.
get_select_field_choices
(raw_choices_data, key_type=None, value_type=None, fail_silently=True)[source]¶ Get select field choices.
Used in
radio
,select
and other choice based fields.Parameters: Return list:
-
fobi.helpers.
get_wizard_form_field_value_from_post
(request, wizard_view_name, form_key, field_name, fail_silently=True)[source]¶ Get wizard form field value from POST.
This is what we could have:
>>> request.POST >>> { >>> 'csrfmiddlewaretoken': ['kEprTL218a8HNcC02QefNNnF'], >>> 'slider-form-test_slider': ['14'], >>> 'form_wizard_view-current_step': ['slider-form'], >>> 'slider-form-test_email': ['user@example.com'] >>> }
Note, that we know nothing about the types here, type conversion should be done manually. The values returned are strings always.
Parameters: - request (django.http.HttpRequest) –
- wizard_view_name (str) –
- form_key (str) – Typically, this would be the step name (form slug).
- field_name (str) – Field name.
- fail_silently (bool) – If set to True, no errors raised.
Return str: Since everything in session is stored as string.
-
fobi.helpers.
get_wizard_form_field_value_from_request
(request, wizard_view_name, form_key, field_name, fail_silently=True, session_priority=False)[source]¶ Get wizard form field value from request.
Note, that we know nothing about the types here, type conversion should be done manually. The values returned are strings always.
Parameters: - request (django.http.HttpRequest) –
- wizard_view_name (str) –
- form_key (str) – Typically, this would be the step name (form slug).
- field_name (str) – Field name.
- fail_silently (bool) – If set to True, no errors raised.
- session_priority (bool) – If set to True, first try to read from session.
Return str: Since everything in session is stored as string.
-
fobi.helpers.
get_wizard_form_field_value_from_session
(request, wizard_view_name, form_key, field_name, fail_silently=True)[source]¶ Get wizard form field value from session.
This is what we could have:
>>> request.session['wizard_form_wizard_view']['step_data'] >>> { >>> 'slider-form': { >>> 'csrfmiddlewaretoken': ['DhINThGTgQ50e2lDnGG4nYrG0a'], >>> 'slider-form-test_slider': ['14'], >>> 'form_wizard_view-current_step': ['slider-form'], >>> 'slider-form-test_email': ['user@example.com'] >>> } >>> }
Note, that we know nothing about the types here, type conversion should be done manually. The values returned are strings always.
Parameters: - request (django.http.HttpRequest) –
- wizard_view_name (str) –
- form_key (str) – Typically, this would be the step name (form slug).
- field_name (str) – Field name.
- fail_silently (bool) – If set to True, no errors raised.
Return str: Since everything in session is stored as string.
-
fobi.helpers.
handle_uploaded_file
(upload_dir, image_file)[source]¶ Handle uploaded files.
Parameters: image_file (django.core.files.uploadedfile.InMemoryUploadedFile) – Return string: Path to the image (relative).
-
fobi.helpers.
iterable_to_dict
(items, key_attr_name)[source]¶ Converts iterable of certain objects to dict.
Parameters: - items (iterable) –
- key_attr_name (string) – Attribute to use as a dictionary key.
Return dict:
-
class
fobi.helpers.
JSONDataExporter
(data, filename)[source]¶ Bases:
object
Exporting the data into JSON.
-
fobi.helpers.
map_field_name_to_label
(form)[source]¶ Takes a form and creates label to field name map.
Parameters: form (django.forms.Form) – Instance of django.forms.Form
.Return dict:
-
class
fobi.helpers.
StrippedRequest
(request)[source]¶ Bases:
object
Stripped request object.
-
META
¶ Request meta stripped down.
A standard Python dictionary containing all available HTTP headers. Available headers depend on the client and server, but here are some examples:
- HTTP_ACCEPT_ENCODING: Acceptable encodings for the response.
- HTTP_ACCEPT_LANGUAGE: Acceptable languages for the response.
- HTTP_HOST: The HTTP Host header sent by the client.
- HTTP_REFERER: The referring page, if any.
- HTTP_USER_AGENT: The clients user-agent string.
- QUERY_STRING: The query string, as a single (unparsed) string.
- REMOTE_ADDR: The IP address of the client.
-
is_ajax
()[source]¶ Is ajax?
Returns True if the request was made via an XMLHttpRequest, by checking the HTTP_X_REQUESTED_WITH header for the string ‘XMLHttpRequest’.
-
is_secure
()[source]¶ Is secure.
Returns True if the request is secure; that is, if it was made with HTTPS.
-
path
¶ Path.
A string representing the full path to the requested page, not including the scheme or domain.
-
-
fobi.helpers.
two_dicts_to_string
(headers, data, html_element='p')[source]¶ Two dicts to string.
Takes two dictionaries, assuming one contains a mapping keys to titles and another keys to data. Joins as string and returns wrapped into HTML “p” tag.
-
fobi.helpers.
uniquify_sequence
(sequence)[source]¶ Uniqify sequence.
Makes sure items in the given sequence are unique, having the original order preserved.
Parameters: sequence (iterable) – Return list:
-
fobi.helpers.
update_plugin_data
(entry, request=None)[source]¶ Update plugin data.
Update plugin data of a given entry.
-
fobi.helpers.
validate_initial_for_choices
(plugin_form, field_name_choices='choices', field_name_initial='initial')[source]¶ Validate init for choices. Validates the initial value for the choices given.
Parameters: - plugin_form (fobi.base.BaseFormFieldPluginForm) –
- field_name_choices (str) –
- field_name_initial (str) –
Return str:
-
fobi.helpers.
validate_initial_for_multiple_choices
(plugin_form, field_name_choices='choices', field_name_initial='initial')[source]¶ Validates the initial value for the multiple choices given.
Parameters: - plugin_form (fobi.base.BaseFormFieldPluginForm) –
- field_name_choices (str) –
- field_name_initial (str) –
Return str:
fobi.models module¶
-
class
fobi.models.
AbstractPluginModel
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Abstract plugin model.
Used when
fobi.settings.RESTRICT_PLUGIN_ACCESS
is set to True.Properties: - plugin_uid (str): Plugin UID.
- users (django.contrib.auth.models.User): White list of the users allowed to use the plugin.
- groups (django.contrib.auth.models.Group): White list of the user groups allowed to use the plugin.
-
AbstractPluginModel.
groups
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
AbstractPluginModel.
groups_list
()[source]¶ Groups list.
Flat list (comma separated string) of groups allowed to use the plugin. Used in Django admin.
Return string:
-
AbstractPluginModel.
users
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
fobi.models.
FormElement
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractPluginModel
Form element.
Form field plugin. Used when
fobi.settings.RESTRICT_PLUGIN_ACCESS
is set to True.Properties: - plugin_uid (str): Plugin UID.
- users (django.contrib.auth.models.User): White list of the users allowed to use the form element plugin.
- groups (django.contrib.auth.models.Group): White list of the user groups allowed to use the form element plugin.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormElement.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormElement.
groups
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormElement.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormElement.
objects
= <django.db.models.manager.Manager object>¶
-
FormElement.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormElement.
users
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
fobi.models.
FormHandler
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractPluginModel
Form handler plugin. Used when
fobi.settings.RESTRICT_PLUGIN_ACCESS
is set to True.Properties: - plugin_uid (str): Plugin UID.
- users (django.contrib.auth.models.User): White list of the users allowed to use the form handler plugin.
- groups (django.contrib.auth.models.Group): White list of the user groups allowed to use the form handler plugin.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormHandler.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormHandler.
groups
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormHandler.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormHandler.
objects
= <django.db.models.manager.Manager object>¶
-
FormHandler.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormHandler.
users
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
fobi.models.
FormWizardHandler
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractPluginModel
Form wizard handler plugin. Used when
fobi.settings.RESTRICT_PLUGIN_ACCESS
is set to True.Properties: - plugin_uid (str): Plugin UID.
- users (django.contrib.auth.models.User): White list of the users allowed to use the form handler plugin.
- groups (django.contrib.auth.models.Group): White list of the user groups allowed to use the form handler plugin.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormWizardHandler.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormWizardHandler.
groups
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormWizardHandler.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardHandler.
objects
= <django.db.models.manager.Manager object>¶
-
FormWizardHandler.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardHandler.
users
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
fobi.models.
BaseAbstractPluginEntry
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Base for AbstractPluginEntry.
Properties: - plugin_data (str): JSON formatted string with plugin data.
-
BaseAbstractPluginEntry.
entry_user
¶ Get user from the parent container.
-
BaseAbstractPluginEntry.
get_plugin
(fetch_related_data=False, request=None)[source]¶ Get plugin.
Gets the plugin class (by
plugin_uid
property), makes an instance of it, serves the data stored inplugin_data
field (if available). Once all is done, plugin is ready to be rendered.Parameters: fetch_related_data (bool) – When set to True, plugin is told to re-fetch all related data (stored in models or other sources). Return fobi.base.BasePlugin: Subclass of fobi.base.BasePlugin
.
-
BaseAbstractPluginEntry.
plugin_data
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
AbstractPluginEntry
(*args, **kwargs)[source]¶ Bases:
fobi.models.BaseAbstractPluginEntry
Abstract plugin entry.
Properties: - form_entry (fobi.models.FormEntry): Form to which the field plugin belongs to.
- plugin_uid (str): Plugin UID.
- plugin_data (str): JSON formatted string with plugin data.
-
AbstractPluginEntry.
entry_user
¶ Get user.
-
AbstractPluginEntry.
form_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
AbstractPluginEntry.
form_entry_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
FormWizardEntry
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Form wizard entry.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormWizardEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormWizardEntry.
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
formwizardformentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormWizardEntry.
formwizardhandlerentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormWizardEntry.
get_absolute_url
()[source]¶ Get absolute URL.
Absolute URL, which goes to the form-wizard view view.
Return string:
-
FormWizardEntry.
get_wizard_type_display
(*moreargs, **morekwargs)¶
-
FormWizardEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
is_cloneable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
is_public
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
objects
= <django.db.models.manager.Manager object>¶
-
FormWizardEntry.
savedformwizarddataentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
success_page_message
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
success_page_title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
updated
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormWizardEntry.
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardEntry.
wizard_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
fobi.models.
FormEntry
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Form entry.
Properties: - user (django.contrib.auth.models.User: User owning the plugin.
- name (str): Form name.
- title (str): Form title - used in templates.
- slug (str): Form slug.
- description (str): Form description.
- is_public (bool): If set to True, is visible to public.
- is_cloneable (bool): If set to True, is cloneable.
- position (int): Ordering position in the wizard.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormEntry.
action
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
formelemententry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormEntry.
formfieldsetentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormEntry.
formhandlerentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormEntry.
formwizardformentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormEntry.
get_absolute_url
()[source]¶ Get absolute URL.
Absolute URL, which goes to the form-entry view view page.
Return string:
-
FormEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
is_cloneable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
is_public
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
objects
= <django.db.models.manager.Manager object>¶
-
FormEntry.
savedformdataentry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormEntry.
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
success_page_message
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
success_page_title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
updated
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormEntry.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormEntry.
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
FormElementEntry
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractPluginEntry
Form field entry.
Properties: - form (fobi.models.FormEntry): Form to which the field plugin belongs to.
- plugin_uid (str): Plugin UID.
- plugin_data (str): JSON formatted string with plugin data.
- form_fieldset_entry: Fieldset.
- position (int): Entry position.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormElementEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormElementEntry.
form_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormElementEntry.
form_fieldset_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormElementEntry.
form_fieldset_entry_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormElementEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormElementEntry.
objects
= <django.db.models.manager.Manager object>¶
-
FormElementEntry.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormElementEntry.
position
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
FormFieldsetEntry
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Form fieldset entry.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormFieldsetEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormFieldsetEntry.
form_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormFieldsetEntry.
form_entry_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormFieldsetEntry.
formelemententry_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
FormFieldsetEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormFieldsetEntry.
is_repeatable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormFieldsetEntry.
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormFieldsetEntry.
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
fobi.models.
FormHandlerEntry
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractPluginEntry
Form handler entry.
Properties: - form_entry (fobi.models.FormEntry): Form to which the handler plugin belongs to.
- plugin_uid (str): Plugin UID.
- plugin_data (str): JSON formatted string with plugin data.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormHandlerEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormHandlerEntry.
form_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormHandlerEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormHandlerEntry.
objects
= <django.db.models.manager.Manager object>¶
-
FormHandlerEntry.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
AbstractFormWizardPluginEntry
(*args, **kwargs)[source]¶ Bases:
fobi.models.BaseAbstractPluginEntry
Abstract form wizard plugin entry.
Properties: - form_entry (fobi.models.FormWizardEntry): FormWizard to which the plugin belongs to.
- plugin_uid (str): Plugin UID.
- plugin_data (str): JSON formatted string with plugin data.
-
AbstractFormWizardPluginEntry.
entry_user
¶ Get user.
-
AbstractFormWizardPluginEntry.
form_wizard_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
AbstractFormWizardPluginEntry.
form_wizard_entry_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fobi.models.
FormWizardHandlerEntry
(*args, **kwargs)[source]¶ Bases:
fobi.models.AbstractFormWizardPluginEntry
Form wizard handler entry.
Properties: - form_wizard_entry (fobi.models.FormWizardEntry): FormWizard to which the handler plugin belongs to.
- plugin_uid (str): Plugin UID.
- plugin_data (str): JSON formatted string with plugin data.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
FormWizardHandlerEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
FormWizardHandlerEntry.
form_wizard_entry
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FormWizardHandlerEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
FormWizardHandlerEntry.
objects
= <django.db.models.manager.Manager object>¶
-
FormWizardHandlerEntry.
plugin_uid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
fobi.settings module¶
- RESTRICT_PLUGIN_ACCESS (bool): If set to True, (Django) permission system for fobi plugins is enabled.
- FORM_ELEMENT_PLUGINS_MODULE_NAME (str): Name of the module to placed in the (external) apps in which the fobi form element plugin code should be implemented and registered.
- FORM_HANDLER_PLUGINS_MODULE_NAME (str): Name of the module to placed in the (external) apps in which the fobi form handler plugin code should be implemented and registered.
- FORM_CALLBACKS_MODULE_NAME (str): Name of the module to placed in the (external) apps in which the fobi form callback code should be implemented and registered.
- FORM_HANDLER_PLUGINS_EXECUTION_ORDER (tuple): Order in which the form handler plugins are to be executed.
- FORM_WIZARD_HANDLER_PLUGINS_EXECUTION_ORDER (tuple): Order in which the form handler plugins are to be executed.
- DEBUG
fobi.test module¶
fobi.utils module¶
Another helper module. This module can NOT be safely imported from any fobi (sub)module - thus should be imported carefully.
-
fobi.utils.
get_allowed_plugin_uids
(plugin_model_cls, user)[source]¶ Get allowed plugins uids for user given.
Parameters: - plugin_model_cls (fobi.models.AbstractPluginModel) – Subclass of
fobi.models.AbstractPluginModel
. - user (django.contrib.auth.models.User) –
Return list: - plugin_model_cls (fobi.models.AbstractPluginModel) – Subclass of
-
fobi.utils.
get_user_plugins
(get_allowed_plugin_uids_func, get_registered_plugins_func, registry, user)[source]¶ Get user plugins.
Gets a list of user plugins in a form if tuple (plugin name, plugin description). If not yet autodiscovered, autodiscovers them.
Parameters: - get_allowed_plugin_uids_func (callable) –
- get_registered_plugins_func (callable) –
- registry (fobi.base.BaseRegistry) – Subclass of
fobi.base.BaseRegistry
instance. - user (django.contrib.auth.models.User) –
Return list:
-
fobi.utils.
get_user_plugin_uids
(get_allowed_plugin_uids_func, get_registered_plugin_uids_func, registry, user)[source]¶ Gets a list of user plugin uids as a list.
If not yet auto-discovered, auto-discovers them.
Parameters: - get_allowed_plugin_uids_func (callable) –
- get_registered_plugin_uids_func (callable) –
- registry (fobi.base.BaseRegistry) – Subclass of
fobi.base.BaseRegistry
instance. - user (django.contrib.auth.models.User) –
Return list:
-
fobi.utils.
sync_plugins
()[source]¶ Sync registered plugins.
Syncs the registered plugin list with data in
fobi.models.FormFieldPluginModel
,fobi.models.FormHandlerPluginModel
andfobi.models.FormWizardHandlerPluginModel
.
-
fobi.utils.
get_allowed_form_element_plugin_uids
(user)[source]¶ Get allowed form element plugin uids.
-
fobi.utils.
get_allowed_form_handler_plugin_uids
(user)[source]¶ Get allowed form handler plugin uids.
-
fobi.utils.
get_allowed_form_wizard_handler_plugin_uids
(user)[source]¶ Get allowed form wizard handler plugin uids.
-
fobi.utils.
get_user_form_handler_plugins
(user, exclude_used_singles=False, used_form_handler_plugin_uids=[])[source]¶ Get list of plugins allowed for user.
Parameters: - user (django.contrib.auth.models.User) –
- exclude_used_singles (bool) –
- used_form_handler_plugin_uids (list) –
Return list:
-
fobi.utils.
get_user_form_wizard_handler_plugins
(user, exclude_used_singles=False, used_form_wizard_handler_plugin_uids=[])[source]¶ Get list of plugins allowed for user.
Parameters: - user (django.contrib.auth.models.User) –
- exclude_used_singles (bool) –
- used_form_wizard_handler_plugin_uids (list) –
Return list:
-
fobi.utils.
get_user_form_wizard_handler_plugin_uids
(user)[source]¶ Get user form handler plugin uids.
-
fobi.utils.
get_user_plugins_grouped
(get_allowed_plugin_uids_func, get_registered_plugins_grouped_func, registry, user, sort_items=True)[source]¶ Get user plugins grouped.
Parameters: - get_allowed_plugin_uids_func (callable) –
- get_registered_plugins_grouped_func (callable) –
- registry (fobi.base.BaseRegistry) – Subclass of
fobi.base.BaseRegistry
instance. - user (django.contrib.auth.models.User) –
- sort_items (bool) –
Return dict:
-
fobi.utils.
get_user_form_element_plugins_grouped
(user)[source]¶ Get user form element plugins grouped.
-
fobi.utils.
get_user_form_handler_plugins_grouped
(user)[source]¶ Get user form handler plugins grouped.
-
fobi.utils.
get_user_form_wizard_handler_plugins_grouped
(user)[source]¶ Get user form wizard handler plugins grouped.
-
fobi.utils.
prepare_form_entry_export_data
(form_entry, form_element_entries=None, form_handler_entries=None)[source]¶ Prepare form entry export data.
Parameters: - form_entry (fobi.modes.FormEntry) – Instance of.
- form_element_entries (django.db.models.QuerySet) – QuerySet of FormElementEntry instances.
- form_handler_entries (django.db.models.QuerySet) – QuerySet of FormHandlerEntry instances.
Return str:
fobi.validators module¶
fobi.views module¶
Views.
-
fobi.views.
add_form_element_entry
(request, *args, **kwargs)[source]¶ Add form element entry.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- form_element_plugin_uid (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
add_form_handler_entry
(request, *args, **kwargs)[source]¶ Add form handler entry.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- form_handler_plugin_uid (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
add_form_wizard_form_entry
(request, *args, **kwargs)[source]¶ Add form wizard form entry.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_entry_id (int) –
- form_entry_id (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
add_form_wizard_handler_entry
(request, *args, **kwargs)[source]¶ Add form handler entry.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- form_handler_plugin_uid (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
create_form_entry
(request, *args, **kwargs)[source]¶ Create form entry.
Parameters: - request (django.http.HttpRequest) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (str) –
Return django.http.HttpResponse:
-
fobi.views.
create_form_wizard_entry
(request, *args, **kwargs)[source]¶ Create form wizard entry.
Parameters: - request (django.http.HttpRequest) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (str) –
Return django.http.HttpResponse:
-
fobi.views.
dashboard
(request, *args, **kwargs)[source]¶ Dashboard.
Parameters: - request (django.http.HttpRequest) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
delete_form_element_entry
(request, *args, **kwargs)[source]¶ Delete form element entry.
Parameters: - request (django.http.HttpRequest) –
- form_element_entry_id (int) –
Return django.http.HttpResponse:
-
fobi.views.
delete_form_entry
(request, *args, **kwargs)[source]¶ Delete form entry.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
delete_form_handler_entry
(request, *args, **kwargs)[source]¶ Delete form handler entry.
Parameters: - request (django.http.HttpRequest) –
- form_handler_entry_id (int) –
Return django.http.HttpResponse:
-
fobi.views.
delete_form_wizard_entry
(request, *args, **kwargs)[source]¶ Delete form wizard entry.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_entry_id (int) –
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
delete_form_wizard_form_entry
(request, *args, **kwargs)[source]¶ Delete form wizard form entry.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_form_entry_id (int) –
Return django.http.HttpResponse:
-
fobi.views.
edit_form_element_entry
(request, *args, **kwargs)[source]¶ Edit form element entry.
Parameters: - request (django.http.HttpRequest) –
- form_element_entry_id (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
edit_form_entry
(request, *args, **kwargs)[source]¶ Edit form entry.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (str) –
Return django.http.HttpResponse:
-
fobi.views.
edit_form_handler_entry
(request, *args, **kwargs)[source]¶ Edit form handler entry.
Parameters: - request (django.http.HttpRequest) –
- form_handler_entry_id (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
edit_form_wizard_handler_entry
(request, *args, **kwargs)[source]¶ Edit form handler entry.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_handler_entry_id (int) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
export_form_entry
(request, *args, **kwargs)[source]¶ Export form entry to JSON.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) –
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
form_entry_submitted
(request, form_entry_slug=None, template_name=None)[source]¶ Form entry submitted.
Parameters: - request (django.http.HttpRequest) –
- form_entry_slug (string) –
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
form_importer
(request, *args, **kwargs)[source]¶ Form importer.
Parameters: - request (django.http.HttpRequest) –
- form_importer_plugin_uid (str) –
- template_name (str) –
-
fobi.views.
form_wizard_entry_submitted
(request, form_wizard_entry_slug=None, template_name=None)[source]¶ Form wizard entry submitted.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_entry_slug (string) –
- template_name (string) –
Return django.http.HttpResponse:
-
fobi.views.
form_wizards_dashboard
(request, *args, **kwargs)[source]¶ Dashboard for form wizards.
Parameters: - request (django.http.HttpRequest) –
- theme (fobi.base.BaseTheme) – Theme instance.
- template_name (string) –
Return django.http.HttpResponse:
-
class
fobi.views.
FormWizardView
(**kwargs)[source]¶ Bases:
fobi.wizard.views.dynamic.DynamicSessionWizardView
Dynamic form wizard.
-
file_storage
= <django.core.files.storage.FileSystemStorage object>¶
-
-
fobi.views.
import_form_entry
(request, *args, **kwargs)[source]¶ Import form entry.
Parameters: - request (django.http.HttpRequest) –
- template_name (string) –
Return django.http.HttpResponse:
fobi.widgets module¶
-
class
fobi.widgets.
BooleanRadioSelect
(*args, **kwargs)[source]¶ Bases:
django.forms.widgets.RadioSelect
Boolean radio select for Django.
Example: >>> class DummyForm(forms.Form): >>> agree = forms.BooleanField(label=_("Agree?"), >>> required=False, >>> widget=BooleanRadioSelect)
-
media
¶
-
-
class
fobi.widgets.
NumberInput
(attrs=None)[source]¶ Bases:
django.forms.widgets.TextInput
-
input_type
= u'number'¶
-
media
¶
-