Hi All, I know this is something very basic (perhaps even a typo), but the code below gives an error:
" password = models.CharField(widget=PasswordInput()) TypeError: __init__() got an unexpected keyword argument 'widget' " ( This should be similar to what was presented in the official doc: >>> class ArticleForm(ModelForm): ... pub_date = DateField(widget=MyDateWidget()) ) The commented out line (validate_password) renders to type ="text", and so I wanted to have it render as type="password" --- from django.db import models from django.forms import ModelForm from django.forms.widgets import PasswordInput from django import forms # Create your models here. class User_Account(models.Model): username=models.CharField(max_length="24") password = models.CharField(widget=PasswordInput()) # validate_password=models.CharField(max_length="10") date_of_birth=models.DateTimeField() email= models.EmailField(primary_key=True) def __unicode__(self): return self.name class User_AccountForm(ModelForm): class Meta: model = User_Account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---