diff --git a/datalab/datalab_session/models.py b/datalab/datalab_session/models.py index 6d97669..f94720c 100644 --- a/datalab/datalab_session/models.py +++ b/datalab/datalab_session/models.py @@ -5,6 +5,9 @@ class DataSession(models.Model): + class Meta: + ordering = ['-modified'] + user = models.ForeignKey( User, on_delete=models.CASCADE, help_text='The user that this DataSession belongs too' @@ -43,6 +46,9 @@ def from_db(cls, db, field_names, values): class DataOperation(models.Model): + class Meta: + ordering = ['pk'] + session = models.ForeignKey( DataSession, related_name='operations', on_delete=models.CASCADE, help_text='The DataSession to which this DataOperation belongs'