Nader,
Within your model use the field type that corresponds to the data that you
are going to store in it.  There is no 'password' data-type that I know of,
nor is there a database column type of 'password', in most RDBMS's.

You need to store characters in the database for the password, however you
obfuscate or encrypt or hash them is up to you.  The newforms widget for
password is all about entering and displaying the text to users.  Your form
subclass for this model is where you would want to define the password input
widget in order to prevent the password from being viewable upon entry.

I would suggest that if you need a password and as is likely need that
password to be associated with a user that you consider using the built in
django users from auth?  Not sure if this is what you need to do, but I
encourage you to consider it.
-richard


On 9/20/07, Nader <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I use Django  0.96 and in one of model field I have to define a
> password entry:
>
> class MyModel(...):
>    password = modles.PasswordField()
>
> I can't do it because we don't have any "Password" attribute. I have
> been looking for this problem, but it has been not solved. The last
> alternative  was :
>
> from django import newforms as forms
>
>   class MyModel(..):
>       password = forms.CharField(widget=forms.PasswordInput)
>
> But I don't see any text input field. Could somebody tell me how I can
> solve this problem?
>
> Regards,
> Nader
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to