Browse Source

Add default ordering to documents

Jocelyn Delande 9 years ago
parent
commit
98f4f9bedf
1 changed files with 3 additions and 0 deletions
  1. 3 0
      costs/models.py

+ 3 - 0
costs/models.py

@@ -25,6 +25,9 @@ class Document(models.Model):
         (TYPE_PLAN, 'estimation ou étude'),
         (TYPE_PLAN, 'estimation ou étude'),
     ))
     ))
 
 
+    class Meta:
+        ordering = ['-date']
+
     def __str__(self):
     def __str__(self):
         return self.name
         return self.name