diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/index.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/index.py index 34df416..e3e60fb 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/index.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/index.py @@ -1,6 +1,6 @@ import os from typing import Tuple -from molten import App, Route, ResponseRendererMiddleware +from molten import App, Route, ResponseRendererMiddleware, Settings from molten.http import HTTP_404, Request from molten.openapi import Metadata, OpenAPIHandler, OpenAPIUIHandler from molten.settings import SettingsComponent @@ -53,6 +53,14 @@ class ExtApp(App): ), ) + @property + def settings(self): + def _get_settings(_settings: Settings): + return _settings + + settings = self.injector.get_resolver().resolve(_get_settings)() + return settings + def create_app(_components=None, _middleware=None, _routes=None, _renderers=None): """