Revision 85ddc6a3 snf-django-lib/snf_django/management/commands/__init__.py
b/snf-django-lib/snf_django/management/commands/__init__.py | ||
---|---|---|
50 | 50 |
metavar="[pretty, csv, json]", |
51 | 51 |
default="pretty", |
52 | 52 |
choices=["pretty", "csv", "json"], |
53 |
help="Select the output format: pretty [the default], tabs"
|
|
54 |
" [tab-separated output], csv [comma-separated output]"),
|
|
53 |
help="Select the output format: pretty [the default], json, "
|
|
54 |
"csv [comma-separated output]"), |
|
55 | 55 |
) |
56 | 56 |
|
57 | 57 |
|
58 |
class ListCommand(BaseCommand):
|
|
58 |
class ListCommand(SynnefoCommand):
|
|
59 | 59 |
"""Generic *-list management command. |
60 | 60 |
|
61 | 61 |
Management command to handle common tasks when implementing a -list |
... | ... | |
114 | 114 |
astakos_token = None |
115 | 115 |
|
116 | 116 |
help = "Generic List Command" |
117 |
option_list = BaseCommand.option_list + (
|
|
117 |
option_list = SynnefoCommand.option_list + (
|
|
118 | 118 |
make_option( |
119 | 119 |
"-o", "--output", |
120 | 120 |
dest="fields", |
... | ... | |
144 | 144 |
action="store_false", |
145 | 145 |
default=True, |
146 | 146 |
help="Do not display headers"), |
147 |
make_option( |
|
148 |
"--output-format", |
|
149 |
dest="output_format", |
|
150 |
metavar="[pretty, csv, json]", |
|
151 |
default="pretty", |
|
152 |
choices=["pretty", "csv", "json"], |
|
153 |
help="Select the output format: pretty [the default], tabs" |
|
154 |
" [tab-separated output], csv [comma-separated output]"), |
|
155 | 147 |
) |
156 | 148 |
|
157 | 149 |
def __init__(self, *args, **kwargs): |
Also available in: Unified diff