Skip to content

Instantly share code, notes, and snippets.

@b4oshany
Created Sep 17, 2015
Embed
What would you like to do?
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