Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Come up with a new example for extra_template_vars plugin #816

Closed
simonw opened this issue Jun 8, 2020 · 2 comments
Closed

Come up with a new example for extra_template_vars plugin #816

simonw opened this issue Jun 8, 2020 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Jun 8, 2020

This example is obsolete, it's from a time before request.actor and authentication as a built-in concept (#699):

datasette/docs/plugins.rst

Lines 696 to 700 in 0c064c5

@hookimpl
def extra_template_vars(request):
return {
"auth": request.scope.get("auth")
}

https://github.com/simonw/datasette/blob/0c064c5fe220b7b3d8dcf85b02b4e60452c47232/docs/plugins.rst#extra_template_varstemplate-database-table-view_name-request-datasette

@simonw simonw added this to the Datasette 0.44 milestone Jun 8, 2020
@simonw simonw changed the title Come up with a new example for this plugin documentation Come up with a new example for extra_template_vars plugin Jun 8, 2020
@simonw
Copy link
Owner Author

simonw commented Jun 8, 2020

I'm going to show how to display the current user's user-agent.

@simonw simonw closed this as completed in c7d145e Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant