|
|
|
@ -24,8 +24,11 @@ class CSRFSchema(colander.Schema):
@@ -24,8 +24,11 @@ class CSRFSchema(colander.Schema):
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
def as_form(cls, request, url, **kw): |
|
|
|
|
def as_form(cls, request, **kwargs): |
|
|
|
|
url = kwargs.get('url', None) |
|
|
|
|
if not url: |
|
|
|
|
url = request.resource_url(request.context, request.view_name) |
|
|
|
|
schema = cls().bind(request=request) |
|
|
|
|
form = deform.Form(schema, action=url, **kw) |
|
|
|
|
form = deform.Form(schema, action=url, **kwargs) |
|
|
|
|
return form |
|
|
|
|
|
|
|
|
|