fobi.integration package

Submodules

fobi.integration.helpers module

fobi.integration.helpers.get_template_choices(source, choices, theme_specific_choices_key)[source]

Get the template choices.

It’s possible to provide theme templates per theme or just per project.

Parameters:
  • source (str) – Example value ‘feincms_integration’.
  • or list choices (tuple) –
  • theme_specific_choices_key (str) –
Return list:

fobi.integration.processors module

class fobi.integration.processors.IntegrationProcessor[source]

Bases: object

Generic integration processor.

Parameters:
  • form_sent_get_param (str) –
  • can_redirect (bool) – If set to True, if not authenticated an attempt to redirect user to a login page would be made. Otherwise, a message about authentication would be generated instead (in place of the form). Some content management systems, like Django-CMS, aren’t able to redirect on plugin level. For those systems, the value of can_redirect should be set to False.
  • login_required_template_name (str) – Template to be used for rendering the login required message. This is only important when login_required_redirect is set to False.
can_redirect = True
form_sent_get_param = 'sent'
get_context_data(request, instance, **kwargs)[source]

Get context data.

get_form_template_name(request, instance)[source]

Get form template name.

get_login_required_template_name(request, instance)[source]

Get login required template name.

get_process_form_redirect_url(request, instance)[source]

Get process form redirect URL (success).

Parameters:
Return str:
get_success_page_template_name(request, instance)[source]

Get succes page template name.

integration_check(instance)[source]

Integration check.

Performs a simple check to identify whether the model instance has been implemented according to the expectations.

login_required_template_name = 'fobi/integration/login_required.html'

Module contents