extra_template_vars plugin hook (#542)

* extra_template_vars plugin hook

Closes #541

* Workaround for cwd bug

Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691
This commit is contained in:
Simon Willison 2019-07-05 17:05:56 -07:00 committed by GitHub
commit fcfcae21e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 186 additions and 19 deletions

View file

@ -109,9 +109,12 @@ class IndexView(BaseView):
headers=headers,
)
else:
return self.render(
return await self.render(
["index.html"],
databases=databases,
metadata=self.ds.metadata(),
datasette_version=__version__,
request=request,
context={
"databases": databases,
"metadata": self.ds.metadata(),
"datasette_version": __version__,
},
)