Raises an exception if the given app setting is not defined.
(self, name: str, feature: str = "this feature")
| 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`.""" |
no test coverage detected