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

Figure out what to do about DatabaseView.name #2117

Closed
simonw opened this issue Jul 26, 2023 · 1 comment
Closed

Figure out what to do about DatabaseView.name #2117

simonw opened this issue Jul 26, 2023 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Jul 26, 2023

In the old code:

class DatabaseView(DataView):
name = "database"

This name class attribute was later used by some of the plugin hooks, passed as view_name:

@hookspec
def extra_template_vars(
template, database, table, columns, view_name, request, datasette
):
"""Extra template variables to be made available to the template - can return dict or callable or awaitable"""

Figure out how that should work once I've refactored those classes to view functions instead.

Refs:

@simonw
Copy link
Owner Author

simonw commented Aug 8, 2023

I just need to pass view_name to datasette.render_template().

@simonw simonw closed this as completed Aug 8, 2023
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