MongoEngine/mongoengine — pull request #572 by lrossetti (2014-02-11 12:51:55+00:00)
Title: TokenField and PasswordField

I have created two fields: TokenField and PasswordField.

A TokenField generates a random string to be used as any kind of token (like an api token).

The PasswordField will encode/crypt (using hashlib module) the string to be used as a secure string, but when you search for a document using this field you will use the original string value like: User.objects(password="12345").