DJANGO : How to create admin view with a model containt order_by? <p>My model is</p> <pre><code>Class Document(models.Model): Contrat = Contrat.objects.order_by('Contrat_text').distinct('Contrat_text') isContrat = models.BooleanField(('Contrat'), default=True) isCdC = models.BooleanField(('Cahier des Charges'), default=False) isCR = models.BooleanField(('Cahier de Recette'), default=False) isPG = models.BooleanField(('PG'), default=False) isCI = models.BooleanField(('CI'), default=False) isDico = models.BooleanField(('Dictionnaire'), default=False) isSFG = models.BooleanField(('SFG'), default=False) isGuide = models.BooleanField(('Guide'), default=False) isWSDL = models.BooleanField(('WSDL'), default=False) isDivers = models.BooleanField(('Divers'), default=False) def __str__(self): return self.Contrat </code></pre> <p>How to create Admin view with the same filter ?</p> <pre><code>class DocumentAdmin(admin.ModelAdmin): fields = ('Contrat', 'isContrat', 'isCdC', 'isCR', 'isPG', 'isCI', 'isDico', 'isSFG', 'isGuide', 'isWSDL', 'isDivers') list_display = ('Contrat', 'isContrat', 'isCdC', 'isCR', 'isPG', 'isCI', 'isDico', 'isSFG', 'isGuide', 'isWSDL', 'isDivers') ordering = ('id',) </code></pre> <p>admin.site.register(Document, DocumentAdmin)</p>