Environment

The standard settings modules and general commands set certain environment options that can be then queried to distinguish between various run modes and other characteristics. The following functions can be used to set and check these environment options:

django_logikal.env.get_option(option: str, default: str = '') str

Get the value of a given environment option.

django_logikal.env.set_option(option: str, value: str = '1') None

Set a given environment option to the provided value.

django_logikal.env.option_is_set(option: str) bool

Check if the given option has been set.

django_logikal.env.is_dev_env() bool

Check whether the environment is a local development environment.

django_logikal.env.is_testing_env() bool

Check whether the environment is a testing environment.