Updated model fields that had unnecessarily large textAreas for inputs. They are now charFields, which are better sized

This commit is contained in:
CocoByte 2024-02-23 15:44:54 -07:00
parent 92bd8f51b9
commit cc2e24d451
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
5 changed files with 47 additions and 46 deletions

View file

@ -15,23 +15,23 @@ class Contact(TimeStampedModel):
on_delete=models.SET_NULL,
)
first_name = models.TextField(
first_name = models.CharField(
null=True,
blank=True,
verbose_name="first name / given name",
db_index=True,
)
middle_name = models.TextField(
middle_name = models.CharField(
null=True,
blank=True,
)
last_name = models.TextField(
last_name = models.CharField(
null=True,
blank=True,
verbose_name="last name / family name",
db_index=True,
)
title = models.TextField(
title = models.CharField(
null=True,
blank=True,
verbose_name="title or role in your organization",

View file

@ -391,13 +391,13 @@ class DomainApplication(TimeStampedModel):
help_text="Is the tribe recognized by a state",
)
tribe_name = models.TextField(
tribe_name = models.CharField(
null=True,
blank=True,
help_text="Name of tribe",
)
federal_agency = models.TextField(
federal_agency = models.CharField(
choices=AGENCY_CHOICES,
null=True,
blank=True,
@ -418,25 +418,25 @@ class DomainApplication(TimeStampedModel):
help_text="Is your organization an election office?",
)
organization_name = models.TextField(
organization_name = models.CharField(
null=True,
blank=True,
help_text="Organization name",
db_index=True,
)
address_line1 = models.TextField(
address_line1 = models.CharField(
null=True,
blank=True,
help_text="Street address",
verbose_name="Address line 1",
)
address_line2 = models.TextField(
address_line2 = models.CharField(
null=True,
blank=True,
help_text="Street address line 2 (optional)",
verbose_name="Address line 2",
)
city = models.TextField(
city = models.CharField(
null=True,
blank=True,
help_text="City",
@ -455,13 +455,13 @@ class DomainApplication(TimeStampedModel):
help_text="Zip code",
db_index=True,
)
urbanization = models.TextField(
urbanization = models.CharField(
null=True,
blank=True,
help_text="Urbanization (required for Puerto Rico only)",
)
about_your_organization = models.TextField(
about_your_organization = models.CharField(
null=True,
blank=True,
help_text="Information about your organization",

View file

@ -67,13 +67,13 @@ class DomainInformation(TimeStampedModel):
help_text="Is the tribe recognized by a state",
)
tribe_name = models.TextField(
tribe_name = models.CharField(
null=True,
blank=True,
help_text="Name of tribe",
)
federal_agency = models.TextField(
federal_agency = models.CharField(
choices=AGENCY_CHOICES,
null=True,
blank=True,
@ -94,25 +94,25 @@ class DomainInformation(TimeStampedModel):
help_text="Is your organization an election office?",
)
organization_name = models.TextField(
organization_name = models.CharField(
null=True,
blank=True,
help_text="Organization name",
db_index=True,
)
address_line1 = models.TextField(
address_line1 = models.CharField(
null=True,
blank=True,
help_text="Street address",
verbose_name="Street address",
)
address_line2 = models.TextField(
address_line2 = models.CharField(
null=True,
blank=True,
help_text="Street address line 2 (optional)",
verbose_name="Street address line 2 (optional)",
)
city = models.TextField(
city = models.CharField(
null=True,
blank=True,
help_text="City",
@ -132,7 +132,7 @@ class DomainInformation(TimeStampedModel):
help_text="Zip code",
db_index=True,
)
urbanization = models.TextField(
urbanization = models.CharField(
null=True,
blank=True,
help_text="Urbanization (required for Puerto Rico only)",

View file

@ -59,22 +59,22 @@ class PublicContact(TimeStampedModel):
related_name="contacts",
)
name = models.TextField(null=False, help_text="Contact's full name")
org = models.TextField(null=True, help_text="Contact's organization (null ok)")
street1 = models.TextField(null=False, help_text="Contact's street")
street2 = models.TextField(null=True, help_text="Contact's street (null ok)")
street3 = models.TextField(null=True, help_text="Contact's street (null ok)")
city = models.TextField(null=False, help_text="Contact's city")
sp = models.TextField(null=False, help_text="Contact's state or province")
pc = models.TextField(null=False, help_text="Contact's postal code")
cc = models.TextField(null=False, help_text="Contact's country code")
email = models.TextField(null=False, help_text="Contact's email address")
voice = models.TextField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = models.TextField(
name = models.CharField(null=False, help_text="Contact's full name")
org = models.CharField(null=True, help_text="Contact's organization (null ok)")
street1 = models.CharField(null=False, help_text="Contact's street")
street2 = models.CharField(null=True, help_text="Contact's street (null ok)")
street3 = models.CharField(null=True, help_text="Contact's street (null ok)")
city = models.CharField(null=False, help_text="Contact's city")
sp = models.CharField(null=False, help_text="Contact's state or province")
pc = models.CharField(null=False, help_text="Contact's postal code")
cc = models.CharField(null=False, help_text="Contact's country code")
email = models.EmailField(null=False, help_text="Contact's email address")
voice = models.PhoneNumberField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = models.PhoneNumberField(
null=True,
help_text="Contact's fax number (null ok). Must be in ITU.E164.2005 format.",
)
pw = models.TextField(null=False, help_text="Contact's authorization code. 16 characters minimum.")
pw = models.CharField(null=False, help_text="Contact's authorization code. 16 characters minimum.")
@classmethod
def get_default_registrant(cls):

View file

@ -1,5 +1,6 @@
from django.db import models
from .utility.time_stamped_model import TimeStampedModel
from phonenumber_field.modelfields import PhoneNumberField # type: ignore
class StatusChoices(models.TextChoices):
@ -17,13 +18,13 @@ class TransitionDomain(TimeStampedModel):
# classes that import TransitionDomain
StatusChoices = StatusChoices
username = models.TextField(
username = models.CharField(
null=False,
blank=False,
verbose_name="Username",
help_text="Username - this will be an email address",
)
domain_name = models.TextField(
domain_name = models.CharField(
null=True,
blank=True,
verbose_name="Domain name",
@ -49,25 +50,25 @@ class TransitionDomain(TimeStampedModel):
verbose_name="Processed",
help_text="Indicates whether this TransitionDomain was already processed",
)
organization_type = models.TextField(
organization_type = models.CharField(
max_length=255,
null=True,
blank=True,
help_text="Type of organization",
)
organization_name = models.TextField(
organization_name = models.CharField(
null=True,
blank=True,
help_text="Organization name",
db_index=True,
)
federal_type = models.TextField(
federal_type = models.CharField(
max_length=50,
null=True,
blank=True,
help_text="Federal government branch",
)
federal_agency = models.TextField(
federal_agency = models.CharField(
null=True,
blank=True,
help_text="Federal agency",
@ -80,44 +81,44 @@ class TransitionDomain(TimeStampedModel):
null=True,
help_text=("Duplication of registry's expiration " "date saved for ease of reporting"),
)
first_name = models.TextField(
first_name = models.CharField(
null=True,
blank=True,
help_text="First name",
verbose_name="first name / given name",
db_index=True,
)
middle_name = models.TextField(
middle_name = models.CharField(
null=True,
blank=True,
help_text="Middle name (optional)",
)
last_name = models.TextField(
last_name = models.CharField(
null=True,
blank=True,
help_text="Last name",
)
title = models.TextField(
title = models.CharField(
null=True,
blank=True,
help_text="Title",
)
email = models.TextField(
email = models.EmailField(
null=True,
blank=True,
help_text="Email",
)
phone = models.TextField(
phone = models.PhoneNumberField(
null=True,
blank=True,
help_text="Phone",
)
address_line = models.TextField(
address_line = models.CharField(
null=True,
blank=True,
help_text="Street address",
)
city = models.TextField(
city = models.CharField(
null=True,
blank=True,
help_text="City",