mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
ca588b6a30
commit
1c36d07dd4
6 changed files with 117 additions and 7 deletions
|
|
@ -113,6 +113,19 @@ def prepare_connection(conn):
|
|||
"select convert_units(100, 'm', 'ft');"
|
||||
return (amount * ureg(from_)).to(to_).to_tuple()[0]
|
||||
conn.create_function('convert_units', 3, convert_units)
|
||||
|
||||
|
||||
@hookimpl
|
||||
def extra_css_urls():
|
||||
return ['https://example.com/app.css']
|
||||
|
||||
|
||||
@hookimpl
|
||||
def extra_js_urls():
|
||||
return [{
|
||||
'url': 'https://example.com/app.js',
|
||||
'sri': 'SRIHASH',
|
||||
}]
|
||||
'''
|
||||
|
||||
TABLES = '''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue