|
|
@ -6,11 +6,16 @@ from .helpers import ( |
|
|
|
deferred_csrf_validator |
|
|
|
deferred_csrf_validator |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from deform.renderer import configure_zpt_renderer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make Deform widgets aware of our widget template paths |
|
|
|
|
|
|
|
configure_zpt_renderer(['ordr2:templates/deform']) |
|
|
|
|
|
|
|
|
|
|
|
# Base Schema |
|
|
|
# Base Schema |
|
|
|
|
|
|
|
|
|
|
|
class CSRFSchema(colander.Schema): |
|
|
|
class CSRFSchema(colander.Schema): |
|
|
|
''' base class for schemas with csrf validation ''' |
|
|
|
''' base class for schemas with csrf validation ''' |
|
|
|
|
|
|
|
|
|
|
|
csrf_token = colander.SchemaNode( |
|
|
|
csrf_token = colander.SchemaNode( |
|
|
|
colander.String(), |
|
|
|
colander.String(), |
|
|
|
default=deferred_csrf_default, |
|
|
|
default=deferred_csrf_default, |
|
|
|