diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc index fb593c8..dc6edf3 100644 Binary files a/core/__pycache__/forms.cpython-311.pyc and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9c700fe..a033569 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/forms.py b/core/forms.py index 3e108a6..8235a81 100644 --- a/core/forms.py +++ b/core/forms.py @@ -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): diff --git a/core/models.py b/core/models.py index 7de862b..c32522a 100644 --- a/core/models.py +++ b/core/models.py @@ -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)