|
|
|
@ -2,7 +2,10 @@ import colander
@@ -2,7 +2,10 @@ import colander
|
|
|
|
|
import deform |
|
|
|
|
|
|
|
|
|
from . import CSRFSchema |
|
|
|
|
from .helpers import deferred_unique_email_validator |
|
|
|
|
from .helpers import ( |
|
|
|
|
deferred_unique_email_validator, |
|
|
|
|
deferred_unique_username_validator |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# schema for user registration |
|
|
|
@ -14,7 +17,7 @@ class RegistrationSchema(CSRFSchema):
@@ -14,7 +17,7 @@ class RegistrationSchema(CSRFSchema):
|
|
|
|
|
colander.String(), |
|
|
|
|
widget=deform.widget.TextInputWidget(), |
|
|
|
|
description='automagically generated for you', |
|
|
|
|
missing='' |
|
|
|
|
validator = deferred_unique_username_validator |
|
|
|
|
) |
|
|
|
|
first_name = colander.SchemaNode( |
|
|
|
|
colander.String() |
|
|
|
|