mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +02:00
Added e-mail field.
This commit is contained in:
parent
1cc328b03b
commit
1d0efe9163
3 changed files with 11 additions and 7 deletions
|
@ -1021,14 +1021,12 @@ class SeniorOfficialAdmin(ListHeaderAdmin):
|
|||
"""Custom Senior Official Admin class."""
|
||||
|
||||
# NOTE: these are just placeholders. Not part of ACs (haven't been defined yet). Update in future tickets.
|
||||
search_fields = ["first_name", "last_name"]
|
||||
search_help_text = "Search by first name or last name."
|
||||
list_display = [
|
||||
"last_name",
|
||||
]
|
||||
search_fields = ["first_name", "last_name", "email"]
|
||||
search_help_text = "Search by first name, last name or email."
|
||||
list_display = ["first_name", "last_name", "email"]
|
||||
|
||||
# this ordering effects the ordering of results
|
||||
# in autocomplete_fields for user
|
||||
# in autocomplete_fields for Senior Official
|
||||
ordering = ["first_name", "last_name"]
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.10 on 2024-06-21 19:26
|
||||
# Generated by Django 4.2.10 on 2024-06-25 20:31
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
@ -25,6 +25,7 @@ class Migration(migrations.Migration):
|
|||
"phone",
|
||||
phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None),
|
||||
),
|
||||
("email", models.EmailField(blank=True, max_length=320, null=True)),
|
||||
],
|
||||
options={
|
||||
"abstract": False,
|
||||
|
|
|
@ -30,6 +30,11 @@ class SeniorOfficial(TimeStampedModel):
|
|||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
email = models.EmailField(
|
||||
null=True,
|
||||
blank=True,
|
||||
max_length=320,
|
||||
)
|
||||
|
||||
def get_formatted_name(self):
|
||||
"""Returns the contact's name in Western order."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue