MCPcopy Create free account
hub / github.com/EasyIME/PIME / require_setting

Method require_setting

python/python3/tornado/web.py:1589–1595  ·  view source on GitHub ↗

Raises an exception if the given app setting is not defined.

(self, name: str, feature: str = "this feature")

Source from the content-addressed store, hash-verified

1587 return base + get_url(self.settings, path, **kwargs)
1588
1589 def require_setting(self, name: str, feature: str = "this feature") -> None:
1590 """Raises an exception if the given app setting is not defined."""
1591 if not self.application.settings.get(name):
1592 raise Exception(
1593 "You must define the '%s' setting in your "
1594 "application to use %s" % (name, feature)
1595 )
1596
1597 def reverse_url(self, name: str, *args: Any) -> str:
1598 """Alias for `Application.reverse_url`."""

Callers 6

create_signed_valueMethod · 0.95
get_secure_cookieMethod · 0.95
get_login_urlMethod · 0.95
static_urlMethod · 0.95
_oauth_consumer_tokenMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected