github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/577#issuecomment-581758728 | https://api.github.com/repos/simonw/datasette/issues/577 | 581758728 | MDEyOklzc3VlQ29tbWVudDU4MTc1ODcyOA== | 9599 | 2020-02-04T06:11:53Z | 2020-02-04T06:11:53Z | OWNER | For the moment I'm going to move it to `async def render_template()` on `datasette` but otherwise keep the implementation the same. The new signature will be: async def render_template(self, template, context=None, request=None, view_name=None): `template` can be a list of strings or a single string. If a list of strings a template will be selected from them. I'll reconsider the large list of default context variables later on in a separate ticket. | { "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
497171390 | |
https://github.com/simonw/datasette/pull/664#issuecomment-581768760 | https://api.github.com/repos/simonw/datasette/issues/664 | 581768760 | MDEyOklzc3VlQ29tbWVudDU4MTc2ODc2MA== | 9599 | 2020-02-04T06:54:12Z | 2020-02-04T06:54:12Z | OWNER | Needs documentation. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559522877 | |
https://github.com/simonw/datasette/pull/664#issuecomment-581770979 | https://api.github.com/repos/simonw/datasette/issues/664 | 581770979 | MDEyOklzc3VlQ29tbWVudDU4MTc3MDk3OQ== | 9599 | 2020-02-04T07:02:37Z | 2020-02-04T07:02:37Z | OWNER | More importantly, I need to prototype up a plugin that actually uses this method - probably `datasette-upload-csvs` - to make sure it serves its purpose. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559522877 | |
https://github.com/simonw/datasette/pull/664#issuecomment-581988901 | https://api.github.com/repos/simonw/datasette/issues/664 | 581988901 | MDEyOklzc3VlQ29tbWVudDU4MTk4ODkwMQ== | 9599 | 2020-02-04T16:17:55Z | 2020-02-04T16:17:55Z | OWNER | It doesn't make sense for extra body scripts to be available for all template renders (including from plugins) but extra CSS and JS to only be handled by the BaseView render method - especially since extra body scripts are likely to depend on extra JS files. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559522877 | |
https://github.com/simonw/datasette/pull/664#issuecomment-582089909 | https://api.github.com/repos/simonw/datasette/issues/664 | 582089909 | MDEyOklzc3VlQ29tbWVudDU4MjA4OTkwOQ== | 9599 | 2020-02-04T20:03:07Z | 2020-02-04T20:03:07Z | OWNER | I'm going to ship this without documentation, get a couple of plugins out that use it and then add documentation once I'm confident it's right. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559522877 | |
https://github.com/simonw/datasette/pull/664#issuecomment-582092019 | https://api.github.com/repos/simonw/datasette/issues/664 | 582092019 | MDEyOklzc3VlQ29tbWVudDU4MjA5MjAxOQ== | 9599 | 2020-02-04T20:08:22Z | 2020-02-04T20:08:22Z | OWNER | See #576 for existing ticket covering Datasette class documentation. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559522877 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582141086 | https://api.github.com/repos/simonw/datasette/issues/653 | 582141086 | MDEyOklzc3VlQ29tbWVudDU4MjE0MTA4Ng== | 9599 | 2020-02-04T22:12:00Z | 2020-02-04T22:12:00Z | OWNER | You may well be right there! Let's add a test that demonstrates it. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582141626 | https://api.github.com/repos/simonw/datasette/issues/653 | 582141626 | MDEyOklzc3VlQ29tbWVudDU4MjE0MTYyNg== | 9599 | 2020-02-04T22:13:31Z | 2020-02-04T22:13:31Z | OWNER | Looks like SQLite supports `/* ... */` style comments as well. I don't think supporting those should be a requirement to land this though. https://www.sqlite.org/lang_comment.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582100643 | https://api.github.com/repos/simonw/datasette/issues/653 | 582100643 | MDEyOklzc3VlQ29tbWVudDU4MjEwMDY0Mw== | 9599 | 2020-02-04T20:29:56Z | 2020-02-04T20:29:56Z | OWNER | I think there's one nasty edge-case here that we need to worry about: SQLite allows newlines inside of single quoted strings and I've actually started using that in quite a few places - it's great for [embedding markdown in a string](https://github.com/simonw/datasette-render-markdown) for example. The way you're stripping comments right now splits on newlines and removes any lines that start with `--`. I believe that will mangle the following example: ```sql select '# Hello there * This is a list * of items -- [And a link](https://github.com/simonw/datasette-render-markdown).' as demo_markdown ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582101530 | https://api.github.com/repos/simonw/datasette/issues/653 | 582101530 | MDEyOklzc3VlQ29tbWVudDU4MjEwMTUzMA== | 9599 | 2020-02-04T20:32:11Z | 2020-02-04T20:32:11Z | OWNER | This is the kind of problem that has made me think that Datasette would really benefit from including a smart SQLite-syntax SQL parser. Writing one is a bit of a challenge though! There's an example (derived from SQLite SELECT statements) included in pyparsing here but I've not spent much time evaluating it: https://github.com/pyparsing/pyparsing/blob/master/examples/select_parser.py | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/issues/665#issuecomment-582103280 | https://api.github.com/repos/simonw/datasette/issues/665 | 582103280 | MDEyOklzc3VlQ29tbWVudDU4MjEwMzI4MA== | 9599 | 2020-02-04T20:36:48Z | 2020-02-04T20:36:48Z | OWNER | pyparsing has an example based on SQLite SELECT statements: https://github.com/pyparsing/pyparsing/blob/8d9ab59a2b2767ad56c9b852c325075113718c0a/examples/select_parser.py https://github.com/lark-parser/lark is a relatively new (less than two years old) parsing library that looks promising too. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
559964149 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582103856 | https://api.github.com/repos/simonw/datasette/issues/653 | 582103856 | MDEyOklzc3VlQ29tbWVudDU4MjEwMzg1Ng== | 9599 | 2020-02-04T20:38:18Z | 2020-02-04T20:38:18Z | OWNER | We can probably solve this without a SQL parser though. Really all we care about here is that if the FIRST lines of the statement begin with `--` we ignore them and only validate the statement starting from the first non-commented line. I think we can do that without single quoted strings causing us confusion. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582105810 | https://api.github.com/repos/simonw/datasette/issues/653 | 582105810 | MDEyOklzc3VlQ29tbWVudDU4MjEwNTgxMA== | 418191 | 2020-02-04T20:43:01Z | 2020-02-04T20:43:01Z | CONTRIBUTOR | I *think* the existing code will be OK even if I strip the lines in the middle of a new line delimited string. It's only used for the validation, SQLite handles the `--` just fine and the whole SQL textarea still gets sent once it passes validation. I can add your test case to my branch later this evening though. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 | |
https://github.com/simonw/datasette/pull/653#issuecomment-582106085 | https://api.github.com/repos/simonw/datasette/issues/653 | 582106085 | MDEyOklzc3VlQ29tbWVudDU4MjEwNjA4NQ== | 418191 | 2020-02-04T20:43:43Z | 2020-02-04T20:43:43Z | CONTRIBUTOR | but this also doesn't have to land at all if it doesn't match your use case. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
541331755 |