From 22ee70552a9bea545d267bf56b1e6e18fd0cc09c Mon Sep 17 00:00:00 2001 From: David Kane Date: Fri, 2 Jul 2021 09:54:15 +0100 Subject: [PATCH 1/2] Typo in custom widgets section of docs --- docs/widgets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/widgets.md b/docs/widgets.md index 61394bc..501de71 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -135,9 +135,9 @@ You can define your own custom widgets by creating templates with special names. Decide on the column names that you wish to customize for, then sort them alphabetically and join them with hyphens to create your template name. -For example, you could define a widget that handles results returned as `placename`, `geojson` by creating a template called `geojson-label.html`. +For example, you could define a widget that handles results returned as `placename`, `geojson` by creating a template called `placename-geojson.html`. -Save that in one of your template directories as `django_sql_dashboard/widgets/geojson-label.html`. +Save that in one of your template directories as `django_sql_dashboard/widgets/placename-geojson.html`. Any SQL query that returns exactly the columns `placename` and `geojson` will now be rendered by your custom template file. From 299b3d374a675f52dbc93e8f407f1509e89fe52b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 5 Jul 2021 17:32:28 -0700 Subject: [PATCH 2/2] Need to be sorted alphabetically --- docs/widgets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/widgets.md b/docs/widgets.md index 501de71..068fafa 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -135,9 +135,9 @@ You can define your own custom widgets by creating templates with special names. Decide on the column names that you wish to customize for, then sort them alphabetically and join them with hyphens to create your template name. -For example, you could define a widget that handles results returned as `placename`, `geojson` by creating a template called `placename-geojson.html`. +For example, you could define a widget that handles results returned as `placename`, `geojson` by creating a template called `geojson-placename.html`. -Save that in one of your template directories as `django_sql_dashboard/widgets/placename-geojson.html`. +Save that in one of your template directories as `django_sql_dashboard/widgets/geojson-placename.html`. Any SQL query that returns exactly the columns `placename` and `geojson` will now be rendered by your custom template file.