code: def get_env_setting(setting):
      
      try:
          return os.environ[setting]
      except KeyError:
          error_msg = "Set the %s env variable" % setting
          raise ImproperlyConfigured(error_msg)
docs: Get the environment setting or return exception