mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 09:05:17 +00:00
manage.py: better output for list data sources command
This commit is contained in:
parent
db7a287e82
commit
86e6798c96
@ -180,8 +180,12 @@ def import_from_settings(name=None):
|
|||||||
@data_sources_manager.command
|
@data_sources_manager.command
|
||||||
def list():
|
def list():
|
||||||
"""List currently configured data sources"""
|
"""List currently configured data sources"""
|
||||||
for ds in models.DataSource.select():
|
for i, ds in enumerate(models.DataSource.select()):
|
||||||
print "Name: {}\nType: {}\nOptions: {}".format(ds.name, ds.type, ds.options)
|
if i > 0:
|
||||||
|
print "-"*20
|
||||||
|
|
||||||
|
print "Id: {}\nName: {}\nType: {}\nOptions: {}".format(ds.id, ds.name, ds.type, ds.options)
|
||||||
|
|
||||||
|
|
||||||
@data_sources_manager.command
|
@data_sources_manager.command
|
||||||
def new(name, type, options):
|
def new(name, type, options):
|
||||||
|
Loading…
Reference in New Issue
Block a user