(self)
| 77 | raise ConfigurationError("AppConfig.migrations must be a string or None") |
| 78 | |
| 79 | def to_dict(self) -> dict[str, Any]: |
| 80 | data: dict[str, Any] = {"models": self.models} |
| 81 | if self.default_connection is not None: |
| 82 | data["default_connection"] = self.default_connection |
| 83 | if self.migrations is not None: |
| 84 | data["migrations"] = self.migrations |
| 85 | return data |
| 86 | |
| 87 | @classmethod |
| 88 | def from_dict(cls, data: Mapping[str, Any]) -> AppConfig: |
no outgoing calls