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/1660#issuecomment-1074321862 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1074321862 | IC_kwDOBm6k_c5ACNnG | 9599 | 2022-03-21T19:19:01Z | 2022-03-21T19:19:01Z | OWNER | I've simplified this a ton now. I'm going to keep working on this in the long-term but I think this issue can be closed. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1074287177 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1074287177 | IC_kwDOBm6k_c5ACFJJ | 9599 | 2022-03-21T18:51:42Z | 2022-03-21T18:51:42Z | OWNER | `BaseView` is looking a LOT slimmer now that I've moved all of the permissions stuff out of it. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1074136176 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1074136176 | IC_kwDOBm6k_c5ABgRw | 9599 | 2022-03-21T16:38:46Z | 2022-03-21T16:38:46Z | OWNER | I'm going to refactor this stuff out and document it so it can be easily used by plugins: https://github.com/simonw/datasette/blob/4a4164b81191dec35e423486a208b05a9edc65e4/datasette/views/base.py#L69-L103 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1073355032 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1073355032 | IC_kwDOBm6k_c4_-hkY | 9599 | 2022-03-20T21:46:43Z | 2022-03-20T21:46:43Z | OWNER | I think the way to get rid of most of the remaining complexity in `DataView` is to refactor how CSV stuff works - pulling it in line with other export factors and extracting the streaming mechanism. Opening a fresh issue for that. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1073073599 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1073073599 | IC_kwDOBm6k_c4_9c2_ | 9599 | 2022-03-19T20:06:40Z | 2022-03-19T20:06:40Z | OWNER | This blocks: - #1668 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1068418619 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1068418619 | IC_kwDOBm6k_c4_rsY7 | 9599 | 2022-03-15T20:06:19Z | 2022-03-15T20:06:19Z | OWNER | Also related: - #878 - #1512 - #1518 - #870 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1068417357 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1068417357 | IC_kwDOBm6k_c4_rsFN | 9599 | 2022-03-15T20:05:08Z | 2022-03-15T20:05:08Z | OWNER | `DataView` is used as the base class for: - `DatabaseView` - `DatabaseDownload` (just so the permissions checks can be called) - `QueryView` - which isn't routed to directly, it's called from `DatabaseView` if `?sql=` is available and `TableView` for canned queries - `RowTableShared` which is the base class for `TableView` and `RowView` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 | |
https://github.com/simonw/datasette/issues/1660#issuecomment-1068415072 | https://api.github.com/repos/simonw/datasette/issues/1660 | 1068415072 | IC_kwDOBm6k_c4_rrhg | 9599 | 2022-03-15T20:02:36Z | 2022-03-15T20:02:36Z | OWNER | This is one of the worst bits - the `get_format()` method on the `DataView` base class actually modifies `args`, including removing keys! Really confusing: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L454-L482 Then `BaseView` has some surprising responsibilities. It has a utility helper for checking multiple permissions at once: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L81-L105 And its own render method that adds extra stuff to the template context and handles the rel: alternate header: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L131-L157 Then `DataView` does all sorts of weird stuff - from handling database hashes (which I want to remove, see #647): https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L206-L219 To streaming CSV responses: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L286-L308 To handling SQLite exceptions: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L514-L526 And a ton more. It' s a big mess. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1170144879 |