.blob output renderer

* _blob_hash= checking plus refactored to use new BadRequest class, refs #1050
* Replace BlobView with new .blob renderer, closes #1050
* .blob downloads on arbitrary queries, closes #1051
This commit is contained in:
Simon Willison 2020-10-29 15:01:38 -07:00 committed by GitHub
commit 78b3eeaad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 165 additions and 121 deletions

View file

@ -417,17 +417,6 @@ def cascade_app_client():
("/fixtures/binary_data/1", ["table"], 200),
("/fixtures/binary_data/1", ["table", "database"], 200),
("/fixtures/binary_data/1", ["table", "database", "instance"], 200),
# ... and for binary blob
("/fixtures/binary_data/-/blob/1/data.blob", [], 403),
("/fixtures/binary_data/-/blob/1/data.blob", ["database"], 403),
("/fixtures/binary_data/-/blob/1/data.blob", ["instance"], 403),
("/fixtures/binary_data/-/blob/1/data.blob", ["table"], 200),
("/fixtures/binary_data/-/blob/1/data.blob", ["table", "database"], 200),
(
"/fixtures/binary_data/-/blob/1/data.blob",
["table", "database", "instance"],
200,
),
# Can view query even if not allowed database or instance
("/fixtures/magic_parameters", [], 403),
("/fixtures/magic_parameters", ["database"], 403),