I get an AttributeError exception when I try to run the following code on a WebFaction production server (it works in development):
#forms.py
class UserRegistrationForm(forms.ModelForm):
full_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Your full name'}))
email = forms.CharField(widget=forms.EmailInput(attrs={'placeholder':'Activation email will be sent'}))
password = forms.CharField(widget=forms.PasswordInput)
meal_package = forms.ModelChoiceField(queryset=Package.objects.all(), widget=forms.RadioSelect(), empty_label=None)
mobile = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'You will recieve a call on this number'}))
area_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Name of your area'}))
building_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Name of your building'}))
room_no = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Your apartment number'}))
class Meta:
model = User
fields = ['full_name', 'email', 'password', 'meal_package' ,'mobile', 'area_name', 'building_name', 'room_no']
This is the error:
File "/home/hammad/webapps/feastymeals/Feasty-Meals/Users/forms.py", line 27, in <module>
class UserRegistrationForm(forms.ModelForm):
File "/home/hammad/webapps/feastymeals/Feasty-Meals/Users/forms.py", line 29, in UserRegistrationForm
email = forms.CharField(widget=forms.EmailInput(attrs={'placeholder':'Activation email will be sent'}))
AttributeError: 'module' object has no attribute 'EmailInput'