Compare commits

...

2 Commits

3 changed files with 39 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class MemberFlagInline(admin.TabularInline):
@admin.register(Member)
class MemberAdmin(ReadOnlyAdmin):
search_fields = ["account_name"]
search_fields = ["^first_name", "^last_name", "^account_name"]
inlines = [MemberFlagInline]

View File

@ -163,6 +163,11 @@ class Member(models.Model):
managed = False
db_table = "members"
ordering = ("first_name", "last_name")
indexes = [
models.Index(fields=["account_name"]),
models.Index(fields=["first_name"]),
models.Index(fields=["last_name"]),
]
def sanitized_mailbox(self, name_ext: str = "", use_volunteer=False) -> str:
if use_volunteer and self.volunteer_email:

View File

@ -0,0 +1,33 @@
# Generated by Django 4.1.7 on 2023-04-01 03:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("paperwork", "0010_switch_certificationversion_to_semver"),
]
operations = [
migrations.AlterModelOptions(
name="certificationversion",
options={
"base_manager_name": "objects",
"get_latest_by": (
"major",
"minor",
"patch",
"prerelease",
"approval_date",
),
"ordering": (
"definition",
"major",
"minor",
"patch",
"prerelease",
"approval_date",
),
},
),
]