Commit c1608aae authored by Ivan Tyagov's avatar Ivan Tyagov

Code cleanup. Comments added.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14254 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 48937098
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
This is proxy to portal_catalog, with the sole purpose\n
of performing calls when proxy roles are needed\n
"""\n
\n
return context.portal_catalog(*a, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*a, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>a</string>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_unrestrictedSearchResults</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,12 +77,10 @@
that owner is being indexed.\n
"""\n
if user is None:\n
from AccessControl import getSecurityManager\n
sm = getSecurityManager()\n
user = sm.getUser()\n
user = context.portal_membership.getAuthenticatedMember()\n
\n
kw[\'owner\'] = user\n
kw[\'portal_type\'] = context.getPortalMyDocumentTypeList()\n
kw[\'owner\'] = str(user)\n
return context.portal_catalog.countResults(**kw)\n
</string> </value>
</item>
......@@ -135,13 +133,9 @@ return context.portal_catalog.countResults(**kw)\n
<string>user</string>
<string>kw</string>
<string>None</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>sm</string>
<string>_getattr_</string>
<string>context</string>
<string>_write_</string>
<string>str</string>
<string>_apply_</string>
</tuple>
</value>
......@@ -163,6 +157,10 @@ return context.portal_catalog.countResults(**kw)\n
<key> <string>id</string> </key>
<value> <string>ContributionTool_countMyContentList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Counts the number of documents for current user</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -68,7 +68,12 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>pt = context.content_type_registry.findTypeName(\'a.%s\' %ext, None, None)\n
<value> <string>"""\n
Find by give filename extension which portal_type is the right one.\n
Use content_type_registry for that. \n
"""\n
\n
pt = context.content_type_registry.findTypeName(\'a.%s\' %ext, None, None)\n
return (pt,)\n
</string> </value>
</item>
......@@ -135,6 +140,10 @@ return (pt,)\n
<key> <string>id</string> </key>
<value> <string>ContributionTool_getCandidateTypeListByExtension</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Find portal be filename extension</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -69,13 +69,12 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Get latest documents sort.\n
Get latest documents sorted.\n
"""\n
\n
kw[\'portal_type\'] = context.getPortalDocumentTypeList()\n
kw[\'sort_on\'] = ((\'creation_date\',\'descending\'),)\n
res = context.portal_catalog(**kw)\n
return res\n
kw[\'sort_on\'] = ((\'creation_date\', \'descending\'),)\n
result = context.portal_catalog(**kw)\n
return result\n
</string> </value>
</item>
<item>
......@@ -124,7 +123,7 @@ return res\n
<string>context</string>
<string>_write_</string>
<string>_apply_</string>
<string>res</string>
<string>result</string>
</tuple>
</value>
</item>
......@@ -143,6 +142,10 @@ return res\n
<key> <string>id</string> </key>
<value> <string>ContributionTool_getLatestContentList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get latest documents</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -163,6 +163,10 @@ return context.portal_catalog(**kw)\n
<key> <string>id</string> </key>
<value> <string>ContributionTool_getMyContentList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get my documents</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -81,13 +81,11 @@
"""\n
\n
new_dict = {}\n
\n
for k, v in property_dict.items():\n
if v:\n
if k == \'language\':\n
v = v.lower()\n
new_dict[k] = v\n
\n
return new_dict\n
</string> </value>
</item>
......
......@@ -74,34 +74,22 @@
redirects to what is returned\n
"""\n
\n
from Products.Formulator.Errors import FormValidationError\n
\n
translateString = context.Base_translateString\n
request = context.REQUEST\n
\n
# a workaround for a strange problem\n
# (if this line is not here, ZODB raises an exception when\n
# committing transaction)\n
del(kw[\'field_your_file\'])\n
# clean up kw from file field otherwise \n
# ZODB raises an exception when committing transaction\n
kw.pop(\'field_your_file\', None)\n
\n
if kw[\'portal_type\'] == \'\':\n
# we don\'t want to set portal_type to \'\' :)\n
del(kw[\'portal_type\'])\n
kw.pop(\'portal_type\', None)\n
\n
# ingest file\n
doc = context.portal_contributions.newContent(file=file, **kw)\n
\n
msg = translateString("${portal_type} created successfully.", mapping = {\'portal_type\':doc.getPortalType()})\n
msg = translateString("${portal_type} created successfully.",\n
mapping = {\'portal_type\':doc.getPortalType()})\n
return context.Base_redirect(\'view\', keep_items = {\'portal_status_message\':msg})\n
\n
\n
# we leave this for later, because this way it is easier to debug\n
try:\n
doc = context.portal_contributions.newContent(file=file, **kw)\n
if doc is None:\n
raise ValueError(\'new content could not be generated for unknown reason (check system log)\')\n
except Exception, e:\n
msg = translateString("Sorry, object could not be created. Error returned was: ${exception}.", mapping = {\'exception\':str(e)})\n
return context.Base_redirect(dialog_id, keep_items={\'portal_status_message\':msg})\n
</string> </value>
</item>
<item>
......@@ -154,22 +142,14 @@ except Exception, e:\n
<string>form_id</string>
<string>file</string>
<string>kw</string>
<string>Products.Formulator.Errors</string>
<string>FormValidationError</string>
<string>_getattr_</string>
<string>context</string>
<string>translateString</string>
<string>request</string>
<string>_write_</string>
<string>None</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>doc</string>
<string>msg</string>
<string>None</string>
<string>ValueError</string>
<string>Exception</string>
<string>e</string>
<string>str</string>
</tuple>
</value>
</item>
......@@ -192,6 +172,10 @@ except Exception, e:\n
<key> <string>id</string> </key>
<value> <string>ContributionTool_newContent</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Contribute new file</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -83,7 +83,6 @@ filename = \'%s.%s\' % ((filename or context.title_or_id(), format))\n
if typ == \'application/zip\':\n
filename += \'.zip\'\n
\n
\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % filename)\n
return data\n
</string> </value>
......@@ -159,6 +158,10 @@ return data\n
<key> <string>id</string> </key>
<value> <string>Document_convert</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Convert document to given format</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
htmlrepr = context.getHtmlRepresentation()\n
\n
# wrap it in a div with white background\n
htmlrepr = \'<div style="background-color:white;color:black;">%s</div>\' % htmlrepr\n
\n
# fix internal links in spreadsheet\n
if context.portal_type == \'Spreadsheet\':\n
htmlrepr = htmlrepr.replace(\'<A HREF="#table\',\'<A HREF="%s#table\' % context.REQUEST[\'URL\'])\n
\n
return htmlrepr\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>htmlrepr</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_decorateHtmlRepresentation</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -69,11 +69,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Implementation layer - operations to be perfomed after converting data to text\n
by discoverMetadata method or script.\n
This script is called after successful data ingestion.\n
XXX: It\'s possible to hook here some asynchrounous \n
notification for user that the ingestion was successful.\n
"""\n
\n
return\n
pass\n
</string> </value>
</item>
<item>
......@@ -139,6 +139,10 @@ return\n
<key> <string>id</string> </key>
<value> <string>Document_finishIngestion</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Finish ingestion hook script</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -68,40 +68,36 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
<value> <string>""" \n
Generate current document\'s information structure needed to be rendered \n
by web widget Document_viewPopupTemplate.\n
"""\n
calculate new revision number based on what is in the database\n
depends on revision numbering policy\n
here we assign number only if doc has complete coordinates and we make it the next one\n
ALWAYS set proxy roles - required here because we have to find all docs AND get property of the last\n
one of them, no matter what security says\n
"""\n
\n
reference = context.getReference()\n
version = context.getVersion()\n
language = context.getLanguage()\n
if not (reference and version and language):\n
return \'\'\n
\n
res = context.portal_catalog(reference=reference, version=version, language=language, sort_on=((\'revision\',\'descending\'),))\n
translateString = context.Base_translateString\n
\n
if len(res) < 2: # if none or only this one\n
rev = 1\n
else:\n
last_obj = res[0].getObject()\n
if last_obj.getRelativeUrl() == context.getRelativeUrl():\n
last_obj = res[1].getObject() # we don\'t increment our own revision\n
last_rev = last_obj.getRevision()\n
try:\n
rev = int(last_rev) + 1\n
except ValueError:\n
rev = 1\n
vals = {}\n
owner_list = context.Base_getOwnerInfoList()\n
vals[\'owner\'] = \'; \'.join([owner[\'title\'] for owner in owner_list])\n
vals[\'moddate\'] = context.WebSite_getFancyRelativeDate(context.getModificationDate())\n
publdate = context.Document_getLastWorkflowStateEntryDate(state=(\'public,\'), state_name=\'validation_state\')\n
vals[\'publdate\'] = context.WebSite_getFancyRelativeDate(publdate)\n
reldate = context.Document_getLastWorkflowStateEntryDate(state=(\'released,\'), state_name=\'validation_state\')\n
vals[\'reldate\'] = context.WebSite_getFancyRelativeDate(reldate)\n
try:\n
vals[\'status\'] = context.getTranslatedValidationStateTitle() or \'\'\n
except AttributeError:\n
vals[\'status\'] = \'\'\n
try:\n
vals[\'group\'] = context.getGroup() or \'\'\n
except AttributeError:\n
vals[\'group\'] = \'\'\n
try:\n
vals[\'project\'] = context.getSourceProjectTitle() or \'\'\n
except AttributeError:\n
vals[\'project\'] = \'\'\n
\n
return \'%03d\' % rev\n
]]></string> </value>
return context.Document_viewPopupTemplate(**vals)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -115,6 +111,12 @@ return \'%03d\' % rev\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......@@ -122,13 +124,7 @@ return \'%03d\' % rev\n
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Reviewer</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -157,17 +153,19 @@ return \'%03d\' % rev\n
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>reference</string>
<string>version</string>
<string>language</string>
<string>res</string>
<string>len</string>
<string>rev</string>
<string>translateString</string>
<string>vals</string>
<string>owner_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>owner</string>
<string>_getitem_</string>
<string>last_obj</string>
<string>last_rev</string>
<string>int</string>
<string>ValueError</string>
<string>_write_</string>
<string>publdate</string>
<string>reldate</string>
<string>AttributeError</string>
<string>_apply_</string>
</tuple>
</value>
</item>
......@@ -184,7 +182,7 @@ return \'%03d\' % rev\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_getNewRevision</string> </value>
<value> <string>Document_getPopupInfo</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>IntegerField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_int_index</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>integer_out_of_range</string> </key>
<value> <string>The integer you entered was out of range.</string> </value>
</item>
<item>
<key> <string>not_integer</string> </key>
<value> <string>You did not enter an integer.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>end</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>start</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>end</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>start</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>end</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>start</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Index</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_source_project_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_source_project_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_library</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request=context.REQUEST\n
try:\n
request.RESPONSE.setHeader(\'Content-type\', context.getContentType())\n
except AttributeError:\n
request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % context.title_or_id())\n
return context.manage_FTPget()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>AttributeError</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_download</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment