class AdditinoalUserInfo(models.Model):
user = models.ForeignKey(User, unique=True)
extra_password = models.CharField("Password", blank=True)
That will create a new table for you and a column for new password. You then need to use Django functions to hash the content of the extra_password field.
I hope that helps!
-m
-- On 1 February 2012 19:24, apalsson <andreas.palsson@gmail.com> wrote:
Hello.
A very simple question.
I am building an authentication back end to support TWO passwords.
This requires me to add an extra table to store the secondary password
plus a ForeignKey to User.
The confusing part is, how I make Django automatically create the
needed table when SyncDB is run?
And how do I make this new table show up in the Admin-interface as
well?
Thanks.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment