title: How to store Django hashed password without the User object?
body: <p>I have a Django application that allows web visitors to create there own accounts. Once they create an account with a passwords, they should receive and email containing activation code. When a web-visitor creates a new account, they need to receive an activation email containing a unique key. </p>
  
  <p>Obviously, I can do all this using Django's built-in authentication system. I've done it before without any problems. However, in this application, I don't want to pollute my Users table with inactive users. I only want activated users to appear in the Users table. So although I will use Django's account system for authenticating activated users, until they become activated, I'm rolling my own system. I'm keeping all the data about not-yet-activated users in a separate Django Model object (called <code>UserActivation</code>). And I will be managing the sending of the activation email myself.</p>
  
  <p>The problem I'm having is that I don't want to store the user-submitted password in Plain text. I want to store it in my UserActivation object in a field called "password" in the same hashed-format it would appear in the User table. To put it into the user object, I would have done <code>myUser.set_password("plainTextPassword")</code>. How can I get this same value and stuff it into <code>UserActivation.password</code>?</p>
  
  <p>From looking at <a href="https://docs.djangoproject.com/en/1.4/topics/auth/" rel="noreferrer"><strong>this</strong></a> doc, it seems that there is a <code>make_password()</code> function that returns the value that I need. But I still need a User object to call that method. How can I conver <code>"plainTextPassword"</code> to hashed password without going through the User object?</p>