|Reported by:||maurycy||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It's very common to save passwords this way:
class Test(meta.Model): fields = ( meta.CharField('username', 'username', maxlength=64), meta.CharField('password_md5', 'password MD5 hash', maxlength=32), )
As you see, MD5 hash of the password is saved in !meta.CharField field. Aside of limiting to only MD5 hash, programmer has to remember length of the generated hash and during read or write to handle it with her or his own functions on the Python layer, like md5.
My proposal is to create meta.HashField() field, which would preserve programmers time and take care on these common operations, as they could be done on database-side with bult-in functions like MD5() or other. It would also can support param type specifing which hash algorith to use.