diff --git a/ram/consist/migrations/0002_alter_consist_options.py b/ram/consist/migrations/0002_alter_consist_options.py new file mode 100644 index 0000000..b3e5239 --- /dev/null +++ b/ram/consist/migrations/0002_alter_consist_options.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.6 on 2022-07-10 13:19 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('consist', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='consist', + options={'ordering': ['creation_time']}, + ), + ] diff --git a/ram/consist/models.py b/ram/consist/models.py index cdd1085..3bf1d6d 100644 --- a/ram/consist/models.py +++ b/ram/consist/models.py @@ -27,6 +27,9 @@ class Consist(models.Model): def get_absolute_url(self): return reverse("consist", kwargs={"uuid": self.uuid}) + class Meta: + ordering = ["creation_time"] + class ConsistItem(models.Model): consist = models.ForeignKey( diff --git a/ram/portal/templates/base.html b/ram/portal/templates/base.html index ae063c0..7d16270 100644 --- a/ram/portal/templates/base.html +++ b/ram/portal/templates/base.html @@ -34,7 +34,7 @@