Revision c1ba7f26
b/snf-webproject/synnefo/webproject/management/commands/__init__.py | ||
---|---|---|
104 | 104 |
# Default filters and excludes |
105 | 105 |
filters = {} |
106 | 106 |
excludes = {} |
107 |
# Order results |
|
108 |
order_by = None |
|
107 | 109 |
|
108 | 110 |
# Fields used only with user_user_field |
109 | 111 |
astakos_url = None |
... | ... | |
240 | 242 |
except Exception as e: |
241 | 243 |
raise CommandError("Can not filter results: %s" % e) |
242 | 244 |
|
245 |
order_key = self.order_by if self.order_by is not None else 'pk' |
|
246 |
objects = objects.order_by(order_key) |
|
247 |
|
|
243 | 248 |
# --display-mails option |
244 | 249 |
display_mails = options.get("display_mails") |
245 | 250 |
if display_mails: |
Also available in: Unified diff