title: Django unknown password hashing algorithm - writing a custom hashing alghorithm
body: <p>I migrated users from other site to django site. Old web page had md5 passwords with salt and I am writing a custom hashing alghorithm to so users may authenticate with their old passwords.</p>
  
  <p>When I am trying to login as old user I get:</p>
  
  <pre><code>Unknown password hashing algorithm 'my_hashed_password'. Did you specify it in the PASSWORD_HASHERS setting?
  </code></pre>
  
  <p>Thats my password hasher</p>
  
  <pre><code>class FallbackMD5PasswordHasher(BasePasswordHasher):
  
      algorithm = "fallback_md5"
  
      def salt(self):
          return 'my_salt'
  
      def encode(self, password):
          return hashlib.md5(self.salt() + password).hexdigest()
  
      def verify(self, password, encoded):
          encoded_2 = self.encode(password, '')
          return constant_time_compare(encoded, encoded_2)
  
      def safe_summary(self, encoded):
          return SortedDict([
              (_('algorithm'), self.algorithm),
              (_('hash'), mask_hash(encoded, show=3)),
          ])
  </code></pre>
  
  <p>Thats my settings.py</p>
  
  <pre><code>PASSWORD_HASHERS = (
      'lfs_custom.hasher.FallbackMD5PasswordHasher',
      'django.contrib.auth.hashers.PBKDF2PasswordHasher',
      'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
      'django.contrib.auth.hashers.BCryptPasswordHasher',
      'django.contrib.auth.hashers.SHA1PasswordHasher',
      'django.contrib.auth.hashers.MD5PasswordHasher',
      'django.contrib.auth.hashers.CryptPasswordHasher',
      )
  </code></pre>
  
  <p>Please provide me some info how to fix this :) I can't find it out why its not working.</p>