API documentation¶
Utilities to set up Django applications, both in Web and CLI environments.
-
django_pastedeploy_settings.resolve_local_conf_options(global_conf, local_conf)¶ Return the final values for the items in
local_conf.Raises: - ImportError – If the Django settings module cannot be imported.
- UnsupportedDjangoSettingError – If
local_confcontains a Django setting which is not supported. - MissingDjangoSettingsModuleError – If the
django_settings_moduleoption is not set. - BadDebugFlagError – If Django’s
DEBUGis set instead of Paste’sdebug.
Returns: local_confwith its values deserialized from JSON and variable references resolvedReturn type: The result also includes the following items:
DEBUG: Copied fromglobal_conf['debug'].paste_configuration_file: The path to the PasteDeploy configuration file used.
-
django_pastedeploy_settings.get_configured_django_wsgi_app(global_conf, **local_conf)¶ Load the Django application for use in a WSGI server.
Returns: The WSGI application for Django as returned by get_internal_wsgi_application().Internally, this uses
resolve_local_conf_options()and stores the result as Django settings. Any exceptions raised by that function are also propagated.
-
exception
django_pastedeploy_settings.BadDebugFlagError¶
-
exception
django_pastedeploy_settings.InvalidSettingValueError¶
-
exception
django_pastedeploy_settings.MissingDjangoSettingsModuleError¶
-
exception
django_pastedeploy_settings.SettingException¶
-
exception
django_pastedeploy_settings.UnsupportedDjangoSettingError¶