def view(country_id=None): app = flask.current_app country = Country.get_or_404(country_id) return { "mk": sugar.MarkupGenerator( app.jinja_env.get_template("widgets/widgets_view.html") ), "country": country, "country_schema": CountrySchema(country) }