the hash you set is the salty sha1 hexdigest, since django (and probably many others) keeps it by default.
code to verify that it is in contrib / auth / models.py . From there, you can see that django works with md5 by default. All you have to do is update the old hashes to the following form:
md5$<salt>$<hash>
, (md5$$<hash>), sha1 , .