fobi.contrib.plugins.form_handlers.db_store package¶
Subpackages¶
Submodules¶
fobi.contrib.plugins.form_handlers.db_store.admin module¶
-
class
fobi.contrib.plugins.form_handlers.db_store.admin.
SavedFormDataEntryAdmin
(model, admin_site)[source]¶ Bases:
fobi.contrib.plugins.form_handlers.db_store.admin.BaseSavedFormDataEntryAdmin
Saved form data entry admin.
-
SavedFormDataEntryAdmin.
actions
= ['export_data']¶
-
SavedFormDataEntryAdmin.
fieldsets
= ((None, {'fields': ('form_entry', 'user')}), (<django.utils.functional.__proxy__ object at 0x7f4035e7b6d0>, {'fields': ('formatted_saved_data', 'created')}), (<django.utils.functional.__proxy__ object at 0x7f4035e7b950>, {'fields': ('form_data_headers', 'saved_data'), 'classes': ('collapse',)}))¶
-
SavedFormDataEntryAdmin.
list_display
= ('form_entry', 'user', 'formatted_saved_data', 'created')¶
-
SavedFormDataEntryAdmin.
list_filter
= ('form_entry', 'user')¶
-
SavedFormDataEntryAdmin.
media
¶
-
SavedFormDataEntryAdmin.
only_args
= ['form_entry']¶
-
SavedFormDataEntryAdmin.
readonly_fields
= ('created', 'formatted_saved_data')¶
-
-
class
fobi.contrib.plugins.form_handlers.db_store.admin.
SavedFormWizardDataEntryAdmin
(model, admin_site)[source]¶ Bases:
fobi.contrib.plugins.form_handlers.db_store.admin.BaseSavedFormDataEntryAdmin
Saved form wizard data entry admin.
-
SavedFormWizardDataEntryAdmin.
actions
= ['export_data']¶
-
SavedFormWizardDataEntryAdmin.
fieldsets
= ((None, {'fields': ('form_wizard_entry', 'user')}), (<django.utils.functional.__proxy__ object at 0x7f4035e7ba10>, {'fields': ('formatted_saved_data', 'created')}), (<django.utils.functional.__proxy__ object at 0x7f4035e7bb50>, {'fields': ('form_data_headers', 'saved_data'), 'classes': ('collapse',)}))¶
-
SavedFormWizardDataEntryAdmin.
list_display
= ('form_wizard_entry', 'user', 'formatted_saved_data', 'created')¶
-
SavedFormWizardDataEntryAdmin.
list_filter
= ('form_wizard_entry', 'user')¶
-
SavedFormWizardDataEntryAdmin.
media
¶
-
SavedFormWizardDataEntryAdmin.
only_args
= ['form_wizard_entry']¶
-
SavedFormWizardDataEntryAdmin.
readonly_fields
= ('created', 'formatted_saved_data')¶
-
fobi.contrib.plugins.form_handlers.db_store.apps module¶
fobi.contrib.plugins.form_handlers.db_store.base module¶
-
class
fobi.contrib.plugins.form_handlers.db_store.base.
DBStoreHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.FormHandlerPlugin
DB store form handler plugin.
Can be used only once per form.
-
allow_multiple
= False¶
-
custom_actions
(form_entry, request=None)[source]¶ Custom actions.
Adding a link to view the saved form entries.
Return iterable:
-
name
= <django.utils.functional.__proxy__ object>¶
-
run
(form_entry, request, form, form_element_entries=None)[source]¶ Run.
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.
- form_entry (fobi.models.FormEntry) – Instance of
-
save_form_data_entry
(form_entry, request, field_name_to_label_map, cleaned_data)[source]¶ Save form data entry.
Might be used in integration plugins.
-
uid
= 'db_store'¶
-
-
class
fobi.contrib.plugins.form_handlers.db_store.base.
DBStoreWizardHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.FormWizardHandlerPlugin
DB store form wizard handler plugin.
Can be used only once per form.
-
allow_multiple
= False¶
-
custom_actions
(form_wizard_entry, request=None)[source]¶ Custom actions.
Adding a link to view the saved form entries.
Return iterable:
-
name
= <django.utils.functional.__proxy__ object>¶
-
run
(form_wizard_entry, request, form_list, form_wizard, form_element_entries=None)[source]¶ Run.
Parameters: - form_wizard_entry (fobi.models.FormWizardEntry) – Instance
of
fobi.models.FormWizardEntry
. - request (django.http.HttpRequest) –
- form_list (list) – List of
django.forms.Form
instances. - form_wizard (fobi.wizard.views.dynamic.DynamicWizardView) – Instance of
fobi.wizard.views.dynamic.DynamicWizardView
. - form_element_entries (iterable) – Iterable of
fobi.models.FormElementEntry
objects.
- form_wizard_entry (fobi.models.FormWizardEntry) – Instance
of
-
uid
= 'db_store'¶
-
fobi.contrib.plugins.form_handlers.db_store.conf module¶
-
fobi.contrib.plugins.form_handlers.db_store.conf.
get_setting
(setting, override=None)[source]¶ Get setting.
Get a setting from
fobi.contrib.plugins.form_handlers.db_store
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.contrib.plugins.form_handlers.db_store.defaults module¶
fobi.contrib.plugins.form_handlers.db_store.fobi_form_handlers module¶
-
class
fobi.contrib.plugins.form_handlers.db_store.fobi_form_handlers.
DBStoreHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.FormHandlerPlugin
DB store form handler plugin.
Can be used only once per form.
-
allow_multiple
= False¶
-
custom_actions
(form_entry, request=None)[source]¶ Custom actions.
Adding a link to view the saved form entries.
Return iterable:
-
name
= <django.utils.functional.__proxy__ object>¶
-
run
(form_entry, request, form, form_element_entries=None)[source]¶ Run.
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.
- form_entry (fobi.models.FormEntry) – Instance of
-
save_form_data_entry
(form_entry, request, field_name_to_label_map, cleaned_data)[source]¶ Save form data entry.
Might be used in integration plugins.
-
uid
= 'db_store'¶
-
-
class
fobi.contrib.plugins.form_handlers.db_store.fobi_form_handlers.
DBStoreWizardHandlerPlugin
(user=None)[source]¶ Bases:
fobi.base.FormWizardHandlerPlugin
DB store form wizard handler plugin.
Can be used only once per form.
-
allow_multiple
= False¶
-
custom_actions
(form_wizard_entry, request=None)[source]¶ Custom actions.
Adding a link to view the saved form entries.
Return iterable:
-
name
= <django.utils.functional.__proxy__ object>¶
-
run
(form_wizard_entry, request, form_list, form_wizard, form_element_entries=None)[source]¶ Run.
Parameters: - form_wizard_entry (fobi.models.FormWizardEntry) – Instance
of
fobi.models.FormWizardEntry
. - request (django.http.HttpRequest) –
- form_list (list) – List of
django.forms.Form
instances. - form_wizard (fobi.wizard.views.dynamic.DynamicWizardView) – Instance of
fobi.wizard.views.dynamic.DynamicWizardView
. - form_element_entries (iterable) – Iterable of
fobi.models.FormElementEntry
objects.
- form_wizard_entry (fobi.models.FormWizardEntry) – Instance
of
-
uid
= 'db_store'¶
-
fobi.contrib.plugins.form_handlers.db_store.helpers module¶
fobi.contrib.plugins.form_handlers.db_store.models module¶
-
class
fobi.contrib.plugins.form_handlers.db_store.models.
AbstractSavedFormDataEntry
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Abstract saved form data entry.
-
AbstractSavedFormDataEntry.
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
AbstractSavedFormDataEntry.
form_data_headers
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
AbstractSavedFormDataEntry.
formatted_saved_data
()[source]¶ Shows the formatted saved data records.
Return string:
-
AbstractSavedFormDataEntry.
get_next_by_created
(*moreargs, **morekwargs)¶
-
AbstractSavedFormDataEntry.
get_previous_by_created
(*moreargs, **morekwargs)¶
-
AbstractSavedFormDataEntry.
saved_data
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
AbstractSavedFormDataEntry.
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.
-
AbstractSavedFormDataEntry.
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.contrib.plugins.form_handlers.db_store.models.
SavedFormDataEntry
(*args, **kwargs)[source]¶ Bases:
fobi.contrib.plugins.form_handlers.db_store.models.AbstractSavedFormDataEntry
Saved form data.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
SavedFormDataEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
SavedFormDataEntry.
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.
-
SavedFormDataEntry.
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.
-
SavedFormDataEntry.
get_next_by_created
(*moreargs, **morekwargs)¶
-
SavedFormDataEntry.
get_previous_by_created
(*moreargs, **morekwargs)¶
-
SavedFormDataEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SavedFormDataEntry.
objects
= <django.db.models.manager.Manager object>¶
-
SavedFormDataEntry.
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.
-
exception
-
class
fobi.contrib.plugins.form_handlers.db_store.models.
SavedFormWizardDataEntry
(*args, **kwargs)[source]¶ Bases:
fobi.contrib.plugins.form_handlers.db_store.models.AbstractSavedFormDataEntry
Saved form data.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
SavedFormWizardDataEntry.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
SavedFormWizardDataEntry.
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.
-
SavedFormWizardDataEntry.
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.
-
SavedFormWizardDataEntry.
get_next_by_created
(*moreargs, **morekwargs)¶
-
SavedFormWizardDataEntry.
get_previous_by_created
(*moreargs, **morekwargs)¶
-
SavedFormWizardDataEntry.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SavedFormWizardDataEntry.
objects
= <django.db.models.manager.Manager object>¶
-
SavedFormWizardDataEntry.
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.
-
exception
fobi.contrib.plugins.form_handlers.db_store.settings module¶
CSV_DELIMITER
(string)CSV_QUOTECHAR
(string)
fobi.contrib.plugins.form_handlers.db_store.views module¶
-
fobi.contrib.plugins.form_handlers.db_store.views.
view_saved_form_data_entries
(request, *args, **kwargs)[source]¶ View saved form data entries.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) – Form ID.
- theme (fobi.base.BaseTheme) – Subclass of
fobi.base.BaseTheme
. - template_name (string) –
Return django.http.HttpResponse:
-
fobi.contrib.plugins.form_handlers.db_store.views.
export_saved_form_data_entries
(request, *args, **kwargs)[source]¶ Export saved form data entries.
Parameters: - request (django.http.HttpRequest) –
- form_entry_id (int) – Form ID.
- theme (fobi.base.BaseTheme) – Subclass of
fobi.base.BaseTheme
.
Return django.http.HttpResponse:
-
fobi.contrib.plugins.form_handlers.db_store.views.
view_saved_form_wizard_data_entries
(request, *args, **kwargs)[source]¶ View saved form wizard data entries.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_entry_id (int) – Form ID.
- theme (fobi.base.BaseTheme) – Subclass of
fobi.base.BaseTheme
. - template_name (string) –
Return django.http.HttpResponse:
-
fobi.contrib.plugins.form_handlers.db_store.views.
export_saved_form_wizard_data_entries
(request, *args, **kwargs)[source]¶ Export saved form wizard data entries.
Parameters: - request (django.http.HttpRequest) –
- form_wizard_entry_id (int) – Form ID.
- theme (fobi.base.BaseTheme) – Subclass of
fobi.base.BaseTheme
.
Return django.http.HttpResponse:
fobi.contrib.plugins.form_handlers.db_store.widgets module¶
-
class
fobi.contrib.plugins.form_handlers.db_store.widgets.
BaseDbStorePluginWidget
(plugin)[source]¶ Bases:
fobi.base.FormHandlerPluginWidget
Base dummy form element plugin widget.
-
export_entries_icon_class
= 'glyphicon glyphicon-export'¶
-
plugin_uid
= 'db_store'¶
-
view_entries_icon_class
= 'glyphicon glyphicon-list'¶
-
view_saved_form_data_entries_template_name
= 'db_store/view_saved_form_data_entries.html'¶
-