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/904#issuecomment-712483066 | https://api.github.com/repos/simonw/datasette/issues/904 | 712483066 | MDEyOklzc3VlQ29tbWVudDcxMjQ4MzA2Ng== | 9599 | 2020-10-19T22:46:48Z | 2020-10-19T22:46:48Z | OWNER | OK, I'm committing to `datasette.urls.table()` and friends, which will be available to (and documented for use in) plugins and will be exposed to templates as `{{ urls.table(...) }}`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 | |
https://github.com/simonw/datasette/issues/904#issuecomment-712355877 | https://api.github.com/repos/simonw/datasette/issues/904 | 712355877 | MDEyOklzc3VlQ29tbWVudDcxMjM1NTg3Nw== | 9599 | 2020-10-19T18:17:22Z | 2020-10-19T18:17:22Z | OWNER | I quite like `datasette.urls.table()` but I'm not sure why. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 | |
https://github.com/simonw/datasette/issues/904#issuecomment-712355706 | https://api.github.com/repos/simonw/datasette/issues/904 | 712355706 | MDEyOklzc3VlQ29tbWVudDcxMjM1NTcwNg== | 9599 | 2020-10-19T18:17:03Z | 2020-10-19T18:17:03Z | OWNER | Options: - `datasette.urls.instance()` (or `datasette.urls.root()`), `datasette.urls.table()` etc - `datasette.url_for.instance()`... - `datasette.url.instance()`... - `datasette.root_url()`, `datasette.table_url()`... | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 | |
https://github.com/simonw/datasette/issues/904#issuecomment-712354600 | https://api.github.com/repos/simonw/datasette/issues/904 | 712354600 | MDEyOklzc3VlQ29tbWVudDcxMjM1NDYwMA== | 9599 | 2020-10-19T18:15:03Z | 2020-10-19T18:15:39Z | OWNER | Related: #1026 (How should datasette.client interact with base_url) Also this comment from https://github.com/simonw/datasette/issues/943#issuecomment-675752436 > One thing to consider here: Datasette's table and database name escaping rules can be a little bit convoluted. > > If a plugin wants to get back the first five rows of a table, it will need to construct a URL `/dbname/tablename?_size=5` - but it will need to know how to turn the database and table names into the correctly escaped `dbname` and `tablename` values. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 | |
https://github.com/simonw/datasette/issues/904#issuecomment-712324077 | https://api.github.com/repos/simonw/datasette/issues/904 | 712324077 | MDEyOklzc3VlQ29tbWVudDcxMjMyNDA3Nw== | 9599 | 2020-10-19T17:39:38Z | 2020-10-19T17:39:38Z | OWNER | If I do these methods I think this should be available on the `datasette` object too, as an internal API for plugins to use to construct redirects and suchlike. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 | |
https://github.com/simonw/datasette/issues/904#issuecomment-710487083 | https://api.github.com/repos/simonw/datasette/issues/904 | 710487083 | MDEyOklzc3VlQ29tbWVudDcxMDQ4NzA4Mw== | 9599 | 2020-10-16T19:34:10Z | 2020-10-19T17:39:04Z | OWNER | Alternatively, I could expose a single object that knows how to construct all kinds of URLs. Something like this: ``` {{ urls.instance() }} {{ urls.database(database_name) }} {{ urls.table(database_name, table_name) }} etc ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
663228985 |