This commit is contained in:
Flatlogic Bot 2026-01-24 06:37:11 +00:00
parent 5073ef280c
commit 0ade1911eb
4 changed files with 3 additions and 11 deletions

View File

@ -5,13 +5,13 @@ class VoterForm(forms.ModelForm):
class Meta:
model = Voter
fields = [
'first_name', 'last_name', 'street_address', 'city', 'state', 'zip_code',
'latitude', 'longitude', 'phone', 'email',
'first_name', 'last_name', 'address', 'phone', 'email',
'voter_id', 'district', 'precinct', 'registration_date',
'candidate_support', 'yard_sign'
]
widgets = {
'registration_date': forms.DateInput(attrs={'type': 'date'}),
'address': forms.Textarea(attrs={'rows': 2}),
}
def __init__(self, *args, **kwargs):

View File

@ -78,15 +78,7 @@ class Voter(models.Model):
voter_id = models.CharField(max_length=50, blank=True)
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)
# Separated address fields
street_address = models.CharField(max_length=255, blank=True)
city = models.CharField(max_length=100, blank=True)
state = models.CharField(max_length=50, blank=True)
zip_code = models.CharField(max_length=20, blank=True)
latitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True)
longitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True)
address = models.TextField(blank=True)
phone = models.CharField(max_length=20, blank=True)
email = models.EmailField(blank=True)
district = models.CharField(max_length=100, blank=True)