|
|
|
@ -6,11 +6,16 @@ from .helpers import (
@@ -6,11 +6,16 @@ from .helpers import (
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
class CSRFSchema(colander.Schema): |
|
|
|
|
''' base class for schemas with csrf validation ''' |
|
|
|
|
|
|
|
|
|
csrf_token = colander.SchemaNode( |
|
|
|
|
colander.String(), |
|
|
|
|
default=deferred_csrf_default, |
|
|
|
|