Revision 0156e40c snf-astakos-app/astakos/im/management/commands/service-list.py
b/snf-astakos-app/astakos/im/management/commands/service-list.py | ||
---|---|---|
52 | 52 |
def handle_noargs(self, **options): |
53 | 53 |
services = Service.objects.all().order_by('id') |
54 | 54 |
|
55 |
labels = ('id', 'order', 'name', 'url', 'auth_token', 'icon')
|
|
56 |
columns = (3, 3, 12, 40, 20, 20)
|
|
55 |
labels = ('id', 'name', 'API url', 'auth_token')
|
|
56 |
columns = (3, 12, 70, 20)
|
|
57 | 57 |
|
58 | 58 |
if not options['csv']: |
59 | 59 |
line = ' '.join(l.rjust(w) for l, w in zip(labels, columns)) |
... | ... | |
62 | 62 |
self.stdout.write(sep + '\n') |
63 | 63 |
|
64 | 64 |
for service in services: |
65 |
fields = (str(service.id), str(service.order), service.name, |
|
66 |
service.url, |
|
67 |
service.auth_token or '', |
|
68 |
service.icon) |
|
65 |
fields = (str(service.id), service.name, |
|
66 |
service.api_url, |
|
67 |
service.auth_token or '') |
|
69 | 68 |
|
70 | 69 |
if options['csv']: |
71 | 70 |
line = '|'.join(fields) |
Also available in: Unified diff