From 068a5f1ccdf8e745455b7ebf99251f6eafd2a681 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 20 Jan 2023 13:16:47 -0500 Subject: [PATCH] membershipworks: Sort flags by name by default --- .../migrations/0002_alter_flag_options.py | 17 +++++++++++++++++ membershipworks/models.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 membershipworks/migrations/0002_alter_flag_options.py diff --git a/membershipworks/migrations/0002_alter_flag_options.py b/membershipworks/migrations/0002_alter_flag_options.py new file mode 100644 index 0000000..0cbef22 --- /dev/null +++ b/membershipworks/migrations/0002_alter_flag_options.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.3 on 2023-01-24 02:02 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("membershipworks", "0001_initial"), + ] + + operations = [ + migrations.AlterModelOptions( + name="flag", + options={"managed": False, "ordering": ("name",)}, + ), + ] diff --git a/membershipworks/models.py b/membershipworks/models.py index b00192a..beb89f8 100644 --- a/membershipworks/models.py +++ b/membershipworks/models.py @@ -15,6 +15,7 @@ class Flag(models.Model): class Meta: managed = False db_table = "flag" + ordering = ("name",) class MemberQuerySet(models.QuerySet):