From dafd8cc6205e330d2f17cf66ca52bee194c008f1 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 29 Jan 2024 11:33:18 -0500 Subject: [PATCH] membershipworks: Add default ordering by start field to EventExt --- .../migrations/0010_alter_eventext_options.py | 16 ++++++++++++++++ membershipworks/models.py | 1 + 2 files changed, 17 insertions(+) create mode 100644 membershipworks/migrations/0010_alter_eventext_options.py diff --git a/membershipworks/migrations/0010_alter_eventext_options.py b/membershipworks/migrations/0010_alter_eventext_options.py new file mode 100644 index 0000000..57a28be --- /dev/null +++ b/membershipworks/migrations/0010_alter_eventext_options.py @@ -0,0 +1,16 @@ +# Generated by Django 5.0.1 on 2024-01-29 19:17 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("membershipworks", "0009_eventext_materials_fee_included_in_price"), + ] + + operations = [ + migrations.AlterModelOptions( + name="eventext", + options={"ordering": ["-start"], "verbose_name": "event"}, + ), + ] diff --git a/membershipworks/models.py b/membershipworks/models.py index 12da651..e529626 100644 --- a/membershipworks/models.py +++ b/membershipworks/models.py @@ -496,6 +496,7 @@ class EventExt(Event): class Meta: verbose_name = "event" + ordering = ["-start"] class EventMeetingTime(models.Model):