def view(self, name: Optional[str] = None, model: Optional[Any] = None) -> Response: """ Returns a view rendered synchronously. :param name: name of the template (path to the template file, optionally without '.html' extension :param model: optional model, required to render the template. :return: a Response object """ if not name: name = self.get_default_view_name() if model: return view(self.templates, self.full_view_name(name), **model) return view(self.templates, self.full_view_name(name))
async def home(request): return view(request, 'home', **home_model)
async def home(jinja): return view(jinja, 'home', **home_model)
async def home(jinja): return view(jinja, "home", home_model)