pluserable.schemas module¶
Colander and Deform schemas.
- class pluserable.schemas.EmailLoginSchema(*args, **kw)[source]¶
Bases:
deform.schema.CSRFSchema
For login, some apps just use email and have no username column.
- class pluserable.schemas.EmailResetPasswordSchema(*args, **kw)[source]¶
Bases:
deform.schema.CSRFSchema
- class pluserable.schemas.UsernameProfileSchema(*args, **kw)[source]¶
Bases:
deform.schema.CSRFSchema
- class pluserable.schemas.UsernameRegisterSchema(*args, **kw)[source]¶
Bases:
deform.schema.CSRFSchema
- class pluserable.schemas.UsernameResetPasswordSchema(*args, **kw)[source]¶
Bases:
deform.schema.CSRFSchema
- pluserable.schemas.email_domain_allowed(node, val)[source]¶
Colander validator that blocks configured email domains.
- pluserable.schemas.email_exists(node, val)[source]¶
Colander validator that ensures a User exists with the email.
- pluserable.schemas.get_checked_password_node(description='Your password must be harder than a dictionary word or proper name!', **kw)[source]¶
- pluserable.schemas.get_email_node(validator=None, description=None)[source]¶
Return a reusable email address node for Colander schemas.
- pluserable.schemas.get_username_creation_node(title='User name', description='Name with which you will log in', validator=None)[source]¶
Return a reusable username node for Colander schemas.
- pluserable.schemas.unique_email(node, val)[source]¶
Colander validator that ensures the email does not exist.
- pluserable.schemas.unique_username(node, val)[source]¶
Colander validator that ensures the username does not exist.
- pluserable.schemas.unix_username(node, value)[source]¶
Colander validator that ensures the username is alphanumeric.
- pluserable.schemas.username_does_not_contain_at(node, value)[source]¶
Ensure the username does not contain an
@
character.This is important because the system can be configured to accept an email or a username in the same field at login time, so the presence or absence of the @ tells us whether it is an email address.
This Colander validator is not being used by default. We are using the
unix_username
validator which does more. But we are keeping this validator here in case someone wishes to use it instead ofunix_username
.