Helper Functions
CKAN helper functions are typically used in templates, but also available everywhere with toolkit.h.helper_name()
.
tables_get_table(table_name)
Get a table definition by its name.
PARAMETER | DESCRIPTION |
---|---|
table_name
|
The name of the table to get
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
TableDefinition | None
|
The table definition or None if the table does not exist |
Source code in ckanext/tables/helpers.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
tables_json_dumps(value)
Convert a value to a JSON string.
PARAMETER | DESCRIPTION |
---|---|
value
|
The value to convert to a JSON string
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The JSON string |
Source code in ckanext/tables/helpers.py
9 10 11 12 13 14 15 16 17 18 |
|