Revision 6dadd24a snf-astakos-app/astakos/im/management/commands/project-list.py

b/snf-astakos-app/astakos/im/management/commands/project-list.py
52 52
    def handle_noargs(self, **options):
53 53
        apps = ProjectApplication.objects.select_related().all()
54 54

  
55
        labels = ('id', 'name', 'state')
56
        columns = (3, 40, 10)
55
        labels = ('application.id', 'project.id', 'name', 'state')
56
        columns = (15, 10, 20, 10)
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 app in apps:
65
            try:
66
                project_id = str(app.project.id)
67
            except:
68
                project_id = ''
65 69
            fields = (
66 70
                str(app.id),
71
                str(project_id),
67 72
                app.definition.name,
68 73
                app.state
69 74
            )

Also available in: Unified diff