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/541#issuecomment-508871981,https://api.github.com/repos/simonw/datasette/issues/541,508871981,MDEyOklzc3VlQ29tbWVudDUwODg3MTk4MQ==,9599,2019-07-05T22:15:35Z,2019-07-05T22:15:35Z,OWNER,"Example usage: ```python @hookimpl def extra_template_vars(request): return { ""auth"": request.scope.get(""auth""), } ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464779810, https://github.com/simonw/datasette/issues/540#issuecomment-508827948,https://api.github.com/repos/simonw/datasette/issues/540,508827948,MDEyOklzc3VlQ29tbWVudDUwODgyNzk0OA==,9599,2019-07-05T17:56:57Z,2019-07-05T17:56:57Z,OWNER,"For the moment I'm going to ignore the multiple plugins case. I shall revisit that at some point in the future, once I actually have multiple plugins that want to be able to customize the navigation at the same time.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/issues/540#issuecomment-508819126,https://api.github.com/repos/simonw/datasette/issues/540,508819126,MDEyOklzc3VlQ29tbWVudDUwODgxOTEyNg==,9599,2019-07-05T17:14:52Z,2019-07-05T17:14:52Z,OWNER,"Having this be customized by a single plugin seems easy enough - define a named block region in the template, the plugin can then provide a template which extends the base template, over-rides the named block, adds some stuff, then calls [super](http://jinja.pocoo.org/docs/2.10/templates/#super-blocks) to include the default content. But... how would this work if there are multiple plugins that want to add to the menu area?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/issues/540#issuecomment-508858729,https://api.github.com/repos/simonw/datasette/issues/540,508858729,MDEyOklzc3VlQ29tbWVudDUwODg1ODcyOQ==,9599,2019-07-05T20:44:50Z,2019-07-05T20:44:50Z,OWNER,"Here's an example custom `base.html` template that appears to have the desired effect: ```html+django {% extends ""default:base.html"" %} {% block extra_head %} {% endblock %} {% block nav %} {{ super() }}

Log out

{% endblock %} ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/pull/542#issuecomment-508876259,https://api.github.com/repos/simonw/datasette/issues/542,508876259,MDEyOklzc3VlQ29tbWVudDUwODg3NjI1OQ==,9599,2019-07-05T22:55:27Z,2019-07-05T22:55:46Z,OWNER,"Here's what `isolated_filesystem()` does: > A context manager that creates a temporary folder and changes the current working directory to it for isolated filesystem tests. https://github.com/pallets/click/issues/395 is a four year old issue suggesting allowing it to have a parent tmp directory passed to it, but since that issue was never closed I don't think it's going to help me.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464786717, https://github.com/simonw/datasette/pull/542#issuecomment-508873216,https://api.github.com/repos/simonw/datasette/issues/542,508873216,MDEyOklzc3VlQ29tbWVudDUwODg3MzIxNg==,9599,2019-07-05T22:27:00Z,2019-07-05T22:27:00Z,OWNER,"I bet that error is something to do with this: https://github.com/simonw/datasette/blob/e06e083240522a281b280b6461e935bf4b47bdbc/tests/test_plugins.py#L195-L197","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464786717, https://github.com/simonw/datasette/issues/540#issuecomment-508806571,https://api.github.com/repos/simonw/datasette/issues/540,508806571,MDEyOklzc3VlQ29tbWVudDUwODgwNjU3MQ==,9599,2019-07-05T16:14:55Z,2019-07-05T16:14:55Z,OWNER,"I think I'll start with something ridiculously simple along these lines: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/pull/542#issuecomment-508873079,https://api.github.com/repos/simonw/datasette/issues/542,508873079,MDEyOklzc3VlQ29tbWVudDUwODg3MzA3OQ==,9599,2019-07-05T22:25:33Z,2019-07-05T22:25:33Z,OWNER,"I'm getting this weird failure again: ``` self = @contextlib.contextmanager def isolated_filesystem(self): """"""A context manager that creates a temporary folder and changes the current working directory to it for isolated filesystem tests. """""" > cwd = os.getcwd() E FileNotFoundError: [Errno 2] No such file or directory ``` I saw this the other day too, but managed to avoid it by skipping any code that messed around with temporary files. Baffled as to why this is showing up now, as none of the changes I'm making here have any relevance to the way temporary files are created or the current working directory is set. I understand the root cause here to be that the working directory for the tests was deleted while the tests were still running, which would seem to indicate that something to do with a `tmpdir` fixture is at fault.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464786717, https://github.com/simonw/datasette/pull/542#issuecomment-508875041,https://api.github.com/repos/simonw/datasette/issues/542,508875041,MDEyOklzc3VlQ29tbWVudDUwODg3NTA0MQ==,9599,2019-07-05T22:43:53Z,2019-07-05T22:43:53Z,OWNER,"I've confirmed that it's the `template_dir=` line quoted above. It isn't the fault of `pathlib` - if you hard-code in the path string like this I still get the same failures: ``` template_dir = ""/Users/simonw/Dropbox/Development/datasette/tests/test_templates"" for client in make_app_client( template_dir=template_dir ): ``` So for some reason setting `template_dir` to a concrete directory breaks those other tests.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464786717, https://github.com/simonw/datasette/issues/541#issuecomment-508872137,https://api.github.com/repos/simonw/datasette/issues/541,508872137,MDEyOklzc3VlQ29tbWVudDUwODg3MjEzNw==,9599,2019-07-05T22:16:57Z,2019-07-05T22:16:57Z,OWNER,"It should allow for awaitables too, to allow for execution of SQL. For example: ```python @hookimpl def extra_template_vars(datasette): async def inner(): first_db = list(datasette.databases.keys())[0] return { ""sqlite_version"": ( await datasette.execute(first_db, ""select sqlite_version()"") ).rows[0][0] } return inner ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464779810, https://github.com/simonw/datasette/issues/540#issuecomment-508769380,https://api.github.com/repos/simonw/datasette/issues/540,508769380,MDEyOklzc3VlQ29tbWVudDUwODc2OTM4MA==,9599,2019-07-05T14:04:12Z,2019-07-05T14:04:12Z,OWNER,Need to figure out a sensible mobile version of this too.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/pull/542#issuecomment-508876468,https://api.github.com/repos/simonw/datasette/issues/542,508876468,MDEyOklzc3VlQ29tbWVudDUwODg3NjQ2OA==,9599,2019-07-05T22:57:32Z,2019-07-05T22:57:32Z,OWNER,"This looks relevant: https://github.com/pytest-dev/pytest/issues/1235 - ""pytest explodes if getcwd fails""","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464786717, https://github.com/simonw/datasette/issues/540#issuecomment-508771246,https://api.github.com/repos/simonw/datasette/issues/540,508771246,MDEyOklzc3VlQ29tbWVudDUwODc3MTI0Ng==,9599,2019-07-05T14:10:35Z,2019-07-05T14:10:35Z,OWNER,https://css-tricks.com/off-canvas-menu-with-css-target/ could be fun. See also https://medium.com/@heyoka/responsive-pure-css-off-canvas-hamburger-menu-aebc8d11d793,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570, https://github.com/simonw/datasette/issues/540#issuecomment-508858510,https://api.github.com/repos/simonw/datasette/issues/540,508858510,MDEyOklzc3VlQ29tbWVudDUwODg1ODUxMA==,9599,2019-07-05T20:43:20Z,2019-07-05T20:43:20Z,OWNER,"https://latest.datasette.io/fixtures/attraction_characteristic/1 now looks like this: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",464449570,