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

More metadata options for template authors #179

Open
simonw opened this issue Jan 14, 2018 · 2 comments
Open

More metadata options for template authors #179

simonw opened this issue Jan 14, 2018 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Jan 14, 2018

See this thread on Twitter: https://twitter.com/simonw/status/952637152797458432

@psychemedia
Copy link
Contributor

To summarise that thread:

  • expose full metadata.json object to the index page template, eg to allow tables to be referred to by name;
  • ability to import multiple metadata.json files, eg to allow metadata files created for a specific SQLite db to be reused in a datasette referring to several database files;

It could also be useful to allow users to import a python file containing custom functions that can that be loaded into scope and made available to custom templates.

@simonw
Copy link
Owner Author

simonw commented May 28, 2018

It could also be useful to allow users to import a python file containing custom functions that can that be loaded into scope and made available to custom templates.

That's now covered by the plugins mechanism - you can create plugins that define custom template functions: http://datasette.readthedocs.io/en/stable/plugins.html#prepare-jinja2-environment-env

@simonw simonw added this to the Datasette 1.0 milestone Jun 20, 2018
@simonw simonw modified the milestones: Datasette 1.0, Next release Jul 24, 2018
@simonw simonw removed this from the Next release milestone May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants