Skip to content

extra_template_vars() needs to handle request None #58

@simonw

Description

@simonw

If another plugin (such as datasette-search-all) tries to render a template without passing a request object the extra_template_vars() hook can throw an error:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions