Adding sensible ordering to common models.

https://trello.com/c/tTwRM2VV/102-tower-api-teams-endpoint-does-not-sort-consistently
This commit is contained in:
Luke Sneeringer
2014-07-24 11:48:55 -05:00
parent ef89737845
commit 627c6f029e
7 changed files with 12 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
class Meta:
app_label = 'main'
unique_together = [('user', 'team', 'kind', 'name')]
ordering = ('kind', 'name')
user = models.ForeignKey(
'auth.User',