Repository navigation
Rename settings to default_allow_facet, default_allow_download, default_allow_stream - #3072
Merged
Merged
Conversation
…lt_allow_stream allow_facet and allow_download become default_allow_facet and default_allow_download, matching default_allow_sql. The previous names keep working everywhere a setting can be set or read, using SETTING_ALIASES. allow_stream becomes default_allow_stream. allow_stream was never in a release so it has no alias. allow_csv_stream, the name that did ship, now points at default_allow_stream. The template context variables allow_download and datasette_allow_facet are unchanged. Closes #1410 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3072 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 80 80
Lines 14000 13999 -1
=====================================
+ Misses 14000 13999 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
table.html now sets DATASETTE_ALLOW_FACET from settings.default_allow_facet, so the table page no longer needs a separate context variable that repeated the setting as a string. Custom table.html templates that used datasette_allow_facet need to switch to settings.default_allow_facet|tojson. Refs #1410 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames three settings so they match
default_allow_sql, using theSETTING_ALIASESmechanism so the names that shipped keep working.allow_facetdefault_allow_facetallow_downloaddefault_allow_downloadallow_csv_streamdefault_allow_streamallow_streamdefault_allow_streamallow_streamwas introduced after 1.0a42 and has never been in a release, so it gets no alias.allow_csv_stream, the name that did ship, now points atdefault_allow_stream.Claude Fable 5.2 Medium
Details
settings=parameter,--setting,datasette.setting()and the settings dictionary passed to templates. They are not listed in--help-settingsor/-/settings.json.datasette_allow_facettemplate variable is removed.table.htmlnow setsDATASETTE_ALLOW_FACETfromsettings.default_allow_facet|tojson. Customtable.htmltemplates that used the variable need the same change. The changelog says so.allow_downloadtemplate variable is unchanged. It is not the setting's value: it also requires the database to be immutable and not in-memory.:ref:labels are renamed, for examplesetting_default_allow_facet.default_allow_stream, plus a new entry for the other two.Not included
#1410 also floats adding these as permissions with
allow_xmetadata blocks. This PR only does the renames.Testing
allow_facet: falsestill returns a 400 for?_facet=andallow_download: falsestill returns a 403 for the.dbdownload.Closes #1410
🤖 Generated with Claude Code