Skip to content

Instantly share code, notes, and snippets.

@b4oshany
Created September 17, 2015 16:24
Show Gist options
  • Save b4oshany/f369e0e7a456a4abf00a to your computer and use it in GitHub Desktop.
Save b4oshany/f369e0e7a456a4abf00a to your computer and use it in GitHub Desktop.
ploneformgen mailer
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<p tal:content="here/getBody_pre | nothing" />
<dl>
<tal:block repeat="field options/wrappedFields | nothing">
<dt tal:content="field/fgField/widget/label" />
<dd tal:content="structure python:field.htmlValue(request)" />
</tal:block>
</dl>
<p tal:content="here/getBody_post | nothing" />
<pre tal:content="here/getBody_footer | nothing" />
<div tal:define="token python:here.tokenize_form();" >
<a tal:attributes="href string: ${token}">the token</a>
</div>
</body>
</html>
tokenTool = context.onetimetoken_storage
token = tokenTool.setToken('anonymous')
portal = context.portal_url.getPortalObject()
return "%s/full-sponsorship?logincode=%s" % (portal.absolute_url(), token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment