home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where "updated_at" is on date 2020-10-24 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 5

  • Plugin hook for loading templates 2
  • Plugin documentation should cover how to bundle static/templates in setup.py 1
  • datasette.urls.static_plugins(...) method 1
  • Document that datasette.render_template(template, ...) also accepts a list of templates 1
  • Link to blob downloads in the right places 1

user 1

  • simonw · 6 ✖

author_association 1

  • OWNER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
716066342 https://github.com/simonw/datasette/issues/1046#issuecomment-716066342 https://api.github.com/repos/simonw/datasette/issues/1046 MDEyOklzc3VlQ29tbWVudDcxNjA2NjM0Mg== simonw 9599 2020-10-24T23:02:07Z 2020-10-24T23:02:25Z OWNER

A download icon would be nice for the links in the table display. I like this one https://primer.style/octicons/download-24

svg <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"> <path d="M4.97 11.03a.75.75 0 111.06-1.06L11 14.94V2.75a.75.75 0 011.5 0v12.19l4.97-4.97a.75.75 0 111.06 1.06l-6.25 6.25a.75.75 0 01-1.06 0l-6.25-6.25zm-.22 9.47a.75.75 0 000 1.5h14.5a.75.75 0 000-1.5H4.75z"></path> </svg>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Link to blob downloads in the right places 728895193  
716048564 https://github.com/simonw/datasette/issues/1033#issuecomment-716048564 https://api.github.com/repos/simonw/datasette/issues/1033 MDEyOklzc3VlQ29tbWVudDcxNjA0ODU2NA== simonw 9599 2020-10-24T20:08:31Z 2020-10-24T20:08:31Z OWNER

Documentation here: https://docs.datasette.io/en/latest/internals.html#datasette-urls

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette.urls.static_plugins(...) method 725099777  
716048199 https://github.com/simonw/datasette/issues/575#issuecomment-716048199 https://api.github.com/repos/simonw/datasette/issues/575 MDEyOklzc3VlQ29tbWVudDcxNjA0ODE5OQ== simonw 9599 2020-10-24T20:05:44Z 2020-10-24T20:05:44Z OWNER

https://docs.datasette.io/en/latest/writing_plugins.html#static-assets

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin documentation should cover how to bundle static/templates in setup.py 497162288  
715643763 https://github.com/simonw/datasette/issues/1042#issuecomment-715643763 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTY0Mzc2Mw== simonw 9599 2020-10-24T00:34:31Z 2020-10-24T00:34:52Z OWNER

I'm going to rename that to template variable from select_templates to templates_considered too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715643646 https://github.com/simonw/datasette/issues/1042#issuecomment-715643646 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTY0MzY0Ng== simonw 9599 2020-10-24T00:33:46Z 2020-10-24T00:33:46Z OWNER

I'd like to do this all in the datasette.render_template() method to ensure it's available to plugins as well, not just core code that uses the BaseView class.

This code is the problem: https://github.com/simonw/datasette/blob/d3e9b0aecb6f8e9b2befd9c654ccb7ce852db3e7/datasette/views/base.py#L114-L133

I think I'll fix this by moving the select_templates mechanism into datasette.render_templates().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715641183 https://github.com/simonw/datasette/issues/1045#issuecomment-715641183 https://api.github.com/repos/simonw/datasette/issues/1045 MDEyOklzc3VlQ29tbWVudDcxNTY0MTE4Mw== simonw 9599 2020-10-24T00:19:29Z 2020-10-24T00:19:29Z OWNER

It turns out it already does that:

https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L710-L720

But the documentation doesn't reflect that:

template - string

The template file to be rendered, e.g. my_plugin.html. Datasette will search for this file first in the --template-dir= location, if it was specified - then in the plugin's bundled templates and finally in Datasette's set of default templates.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document that datasette.render_template(template, ...) also accepts a list of templates 728600048  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 544.814ms · About: github-to-sqlite