-
-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Templates considered" comment broken in >=0.35 #689
Comments
I'm going to debug this using |
Just need the one checking script to run with bisect this time:
import asyncio
import pathlib
from datasette.app import Datasette
import httpx
async def run_check():
ds = Datasette([])
async with httpx.AsyncClient(app=ds.app()) as client:
response = await client.get("http://localhost/")
assert 200 == response.status_code
assert "Templates considered" in response.text
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run_check()) |
|
|
Here's why: the datasette/datasette/views/base.py Lines 75 to 88 in e89b0ef
Which means this logic is always called with a template, not a list of strings: Lines 555 to 571 in e89b0ef
|
So I think the fix is to move the datasette/datasette/views/base.py Lines 75 to 83 in e89b0ef
|
Noticed that the "Templates Considered" comment is missing in 0.37. Believe I traced it back to #664 as you can see it in https://v0-34.datasette.io/ but not https://v0-35.datasette.io/. Looking at the template context debug between the two you can see what is missing from 0.35 vs. 0.34:
The text was updated successfully, but these errors were encountered: