Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • ddd ddd
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • repos
  • relengreleng
  • dddddd
  • Merge requests
  • !6

A whole bunch more changes for jinja views / dashboards

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged 20after4 requested to merge jinja-dashboards into main Oct 20, 2021
  • Overview 0
  • Commits 8
  • Pipelines 0
  • Changes 61

The most important change included here is the view system in ddd_datasette.py there is a request url router that delegates to python modules in www/templates/views/*.py and then passes the variables from the model to a template with a matching filename (except the extension is html)

So the url /-/ddd/$page loads the python module from

www/templates/views/$page.py

which returns some variables for the view.

Then the variables are passed to a jinja template named

www/templates/views/$page.html

Also, canned queries are now loaded from sql files in www/sql/$db_name/$query_name

Finally, the function sql() can be called from templates and it can reference canned queries (See extra_template_vars in ddd_datasette.py)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: jinja-dashboards