From 66bcb88717eb457a92d0cb5b47a307de70dc1eb5 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 3 Sep 2024 22:04:01 -0700 Subject: [PATCH] form class="core" Refs https://github.com/simonw/datasette/issues/2417 --- datasette_search_all/templates/index.html | 2 +- datasette_search_all/templates/search_all.html | 2 +- tests/test_search_all.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/datasette_search_all/templates/index.html b/datasette_search_all/templates/index.html index 54f6a2f..1ffe7c9 100644 --- a/datasette_search_all/templates/index.html +++ b/datasette_search_all/templates/index.html @@ -2,7 +2,7 @@ {% block description_source_license %} {% if searchable_tables %} -
+

diff --git a/datasette_search_all/templates/search_all.html b/datasette_search_all/templates/search_all.html index bc38793..3f16c0d 100644 --- a/datasette_search_all/templates/search_all.html +++ b/datasette_search_all/templates/search_all.html @@ -34,7 +34,7 @@

Search all tables

{% if not searchable_tables %}

There are no tables that have been configured for search.

{% else %} - +

diff --git a/tests/test_search_all.py b/tests/test_search_all.py index 134da52..08d8a3a 100644 --- a/tests/test_search_all.py +++ b/tests/test_search_all.py @@ -10,7 +10,7 @@ async def test_no_form_on_index_if_not_searchable(db_path): datasette = Datasette([db_path]) response = await datasette.client.get("/") assert response.status_code == 200 - assert '' not in response.text + assert '' not in response.text @pytest.mark.asyncio @@ -27,7 +27,7 @@ async def test_shows_form_on_index_if_searchable(db_path): datasette = Datasette([db_path]) response = await datasette.client.get("/") assert response.status_code == 200 - assert '' in response.text + assert '' in response.text @pytest.mark.asyncio @@ -47,7 +47,7 @@ async def test_search_page(db_path): response = await datasette.client.get("/-/search?q=dog") assert response.status_code == 200 content = response.text - assert '' in content + assert '' in content assert "Search: dog" in content assert ( '

  • '