I am trying to add a class attribute to some input elements on my Django form but I'm not sure how to do it specifically. Currently I just have a placeholder attribute, and I'd like to start adding classes/id's so that I can style the form. I have two questions. The first one is how would I go about adding a class/id attribute to the existing placeholder attribute(s) in the following code:
forms.py
class EditUserProfileForm(forms.ModelForm):
class Meta:
model = models.UserProfile
fields = '__all__'
widgets = {
'description': forms.TextInput(attrs={'placeholder': 'Motto'}),
'city': forms.TextInput(attrs={'placeholder': 'City'}),
'website': forms.TextInput(attrs={'placeholder': 'Website/Brand'}),
'phone': forms.TextInput(attrs={'placeholder': 'Phone Number'}),
}
and secondly, after I do this would I need to then makemigrations/migrate? From my understanding you need to migrate whenever a database level change has been made, but I'm not sure what that means entirely.
Any insight is always greatly appreciated. Thanks