Revision 397d5cbe astakos/im/management/commands/listusers.py
b/astakos/im/management/commands/listusers.py | ||
---|---|---|
37 | 37 |
|
38 | 38 |
from astakos.im.models import AstakosUser |
39 | 39 |
|
40 |
from ._common import format_bool |
|
41 |
|
|
40 | 42 |
|
41 | 43 |
class Command(BaseCommand): |
42 | 44 |
help = "List users" |
... | ... | |
73 | 75 |
|
74 | 76 |
for user in users: |
75 | 77 |
id = str(user.id) |
76 |
active = 'YES' if user.is_active else 'NO'
|
|
77 |
admin = 'YES' if user.is_superuser else 'NO'
|
|
78 |
active = format_bool(user.is_active)
|
|
79 |
admin = format_bool(user.is_superuser)
|
|
78 | 80 |
fields = (id, user.email, user.realname, user.affiliation, active, |
79 | 81 |
admin) |
80 | 82 |
|
Also available in: Unified diff