.5
This commit is contained in:
parent
5073ef280c
commit
0ade1911eb
Binary file not shown.
Binary file not shown.
@ -5,13 +5,13 @@ class VoterForm(forms.ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Voter
|
model = Voter
|
||||||
fields = [
|
fields = [
|
||||||
'first_name', 'last_name', 'street_address', 'city', 'state', 'zip_code',
|
'first_name', 'last_name', 'address', 'phone', 'email',
|
||||||
'latitude', 'longitude', 'phone', 'email',
|
|
||||||
'voter_id', 'district', 'precinct', 'registration_date',
|
'voter_id', 'district', 'precinct', 'registration_date',
|
||||||
'candidate_support', 'yard_sign'
|
'candidate_support', 'yard_sign'
|
||||||
]
|
]
|
||||||
widgets = {
|
widgets = {
|
||||||
'registration_date': forms.DateInput(attrs={'type': 'date'}),
|
'registration_date': forms.DateInput(attrs={'type': 'date'}),
|
||||||
|
'address': forms.Textarea(attrs={'rows': 2}),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
@ -78,15 +78,7 @@ class Voter(models.Model):
|
|||||||
voter_id = models.CharField(max_length=50, blank=True)
|
voter_id = models.CharField(max_length=50, blank=True)
|
||||||
first_name = models.CharField(max_length=100)
|
first_name = models.CharField(max_length=100)
|
||||||
last_name = models.CharField(max_length=100)
|
last_name = models.CharField(max_length=100)
|
||||||
|
address = models.TextField(blank=True)
|
||||||
# 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)
|
|
||||||
|
|
||||||
phone = models.CharField(max_length=20, blank=True)
|
phone = models.CharField(max_length=20, blank=True)
|
||||||
email = models.EmailField(blank=True)
|
email = models.EmailField(blank=True)
|
||||||
district = models.CharField(max_length=100, blank=True)
|
district = models.CharField(max_length=100, blank=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user