Set the application mode (development, production, or testing).
(self, mode: str)
| 597 | return self.is_testing_mode() or self.is_development_mode() |
| 598 | |
| 599 | def set_mode(self, mode: str): |
| 600 | """Set the application mode (development, production, or testing).""" |
| 601 | if mode.lower() not in ['development', 'production', 'testing']: |
| 602 | raise ValueError(f"Invalid mode: {mode}. Must be 'development', 'production', or 'testing'") |
| 603 | self.mode = mode.lower() |
| 604 | |
| 605 | def get_allowed_sites(self) -> list[str]: |
| 606 | """Get the list of allowed sites from NLWeb configuration.""" |