calingen.checks

App-specific contributions to Django’s System check framework.

These checks validate the values of app-specific settings and may also perform logical checks in combination with other project settings.

Module Contents

Functions

check_config_value_compiler(*args, **kwargs)

Validate CALINGEN_COMPILER setting.

check_config_value_event_provider_notification(*args, ...)

Verify that CALINGEN_MISSING_EVENT_PROVIDER_NOTIFICATION provides accepted value.

check_session_enabled(*args, **kwargs)

Verify that MIDDLEWARE contains "django.contrib.sessions.middleware.SessionMiddleware".

calingen.checks.check_config_value_compiler(*args, **kwargs)

Validate CALINGEN_COMPILER setting.

  • Check ID: calingen.e003 - default compiler missing

  • Check ID: calingen.e004 - default compiler not importable

Returns:

A list of Messages.

Return type:

list

Warning

This check does not verify the importability (is this a word?) of all configured compilers. It just ensures the presence of the "default" compiler and its importability.

Notes

CALINGEN_COMPILER is a required configuration value and must be provided in the project’s settings module. It is injected with a sane default value, if not provided.

This check ensures, that CALINGEN_COMPILER["default"] is provided and that the provided compiler (instance of calingen.interfaces.plugin_api.CompilerProvider) is importable.

calingen.checks.check_config_value_event_provider_notification(*args, **kwargs)

Verify that CALINGEN_MISSING_EVENT_PROVIDER_NOTIFICATION provides accepted value.

  • Check ID: calingen.e001

Returns:

A list of Messages.

Return type:

list

calingen.checks.check_session_enabled(*args, **kwargs)

Verify that MIDDLEWARE contains "django.contrib.sessions.middleware.SessionMiddleware".

  • Check ID: calingen.e002

Returns:

A list of Messages.

Return type:

list

Notes

The calingen app relies on the availability of Sessions while processing layouts.

This check does only verify that Django’s default Session middleware is active for the project. If a project substituted that middleware by a custom implementation, this check will fail and may be deactivated.