Everything can be changed. Look under auto_id in the newforms docs on
djangoproject.com. The default does it exactly the way you seem to
be, prepending 'id_' to the field name. If you want to set a class,
you need to change the attrs dict on the field's widget.
All a newforms field really cons
Hi,
this is how I am using the newforms.
My Form
class NewEmployeeForm(forms.Form):
contract_from = forms.DateField()
contract_to = forms.DateField()
position = forms.CharField(max_length=20)
My View
def create_employee(request):
f = None
if request.method == 'POST':
2 matches
Mail list logo