I now have the following model:
class User(models.Model):
passwords_match = validators.AlwaysMatchesOtherField("password", "Passwords don't match.")
shortname = models.CharField(maxlength=200)
firstname = models.CharField(maxlength=200)
lastname = models.CharField(maxlength=200)
passwd = models.PasswordField()
passwd_chk= models.PasswordField (validator_list=[passwords_match])
dept = models.CharField(maxlength=200, blank=True)
email = models.EmailField()
etc = models.TextField(blank=True)
is_admin = models.BooleanField ()
manage.py syncdb doesn't create the table. If I substitute modelsCharField(maxlength=200) for the two PasswordField() declarations, the table is created.
chris
On 5/27/06,
Christian Schneider <[EMAIL PROTECTED]> wrote:
Barry,
thanks, it's not in the documentation, yet.
I actually tried it but syncdb didn't run correctly, so I changed it along with a mis-spelled EMailField. Should really fix errors one by one.
chris
On 5/27/06, spacedman <[EMAIL PROTECTED] > wrote:
just use PasswordField() in your model.
Might be a recent introduction. Its literally a two-liner in
django.forms:
class PasswordField(TextField):
input_type = "password"
http://code.djangoproject.com/browser/django/trunk/django/forms/__init__.py
Barry
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
- Re: How to automatically generate a password input fie... Christian Schneider
- Re: How to automatically generate a password inpu... Kenneth Gonsalves
- Re: How to automatically generate a password ... Kenneth Gonsalves
- Re: How to automatically generate a password ... Christian Schneider
- Re: How to automatically generate a password inpu... Steven Armstrong
- Re: How to automatically generate a password ... Christian Schneider