mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
New JSON design for query views (#2118)
* Refs #2111, closes #2110 * New Context dataclass/subclass mechanism, refs #2127 * Define QueryContext and extract get_tables() method, refs #2127 * Fix OPTIONS bug by porting DaatbaseView to be a View subclass * Expose async_view_for_class.view_class for test_routes test * Error/truncated aruments for renderers, closes #2130
This commit is contained in:
parent
5139c0886a
commit
1377a290cd
15 changed files with 579 additions and 112 deletions
|
|
@ -516,6 +516,12 @@ When a request is received, the ``"render"`` callback function is called with ze
|
|||
``request`` - :ref:`internals_request`
|
||||
The current HTTP request.
|
||||
|
||||
``error`` - string or None
|
||||
If an error occurred this string will contain the error message.
|
||||
|
||||
``truncated`` - bool or None
|
||||
If the query response was truncated - for example a SQL query returning more than 1,000 results where pagination is not available - this will be ``True``.
|
||||
|
||||
``view_name`` - string
|
||||
The name of the current view being called. ``index``, ``database``, ``table``, and ``row`` are the most important ones.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue