nautilus.auth.models.fields package

Submodules

nautilus.auth.models.fields.password module

class nautilus.auth.models.fields.password.PasswordField(rounds=12, **kwds)[source]

Bases: peewee.Field

This field allows for safe storage of passwords in a database while supporting easy validation.

Parameters:rounds (int, default=12) – The number of layers of encryption to be performed on the hash. This value is upgradeable and can be increased at any time. The next time the value is updated, it will be saved with the increased encryption.

Example

TODO: add example of equality test

db_field = 'varchar'
db_value(value)[source]

This function is responsible for converting the python value to something that the databse knows how to handle - namely a string.

python_value(value)[source]

This function returns the python object corresponding to the data left in the database.

Convert the hash to a PasswordHash, if it’s non-NULL.

Module contents