[Erp5-report] r17927 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/po...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 30 16:23:11 CET 2007
Author: jerome
Date: Fri Nov 30 16:23:11 2007
New Revision: 17927
URL: http://svn.erp5.org?rev=17927&view=rev
Log:
move all csv related skins from erp5_core to erp5_csv_style
Removed:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFile.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFileForm/
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFile.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFileForm/
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvLine.xml
Removed: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFile.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFile.xml?rev=17926&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFile.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_exportCsvFile.xml (removed)
@@ -1,163 +1,0 @@
-<?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
-\n
-from ZTUtils import make_query\n
-kw = { \'portal_skin\' : \'CSV\',\n
- \'export_only\' : export_only }\n
-\n
-redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+form_id, \n
- make_query(kw) )\n
-\n
-return request[ \'RESPONSE\' ].redirect( redirect_url )\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>form_id=\'\', export_only=1</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>2</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>form_id</string>
- <string>export_only</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>request</string>
- <string>ZTUtils</string>
- <string>make_query</string>
- <string>kw</string>
- <string>redirect_url</string>
- <string>_getitem_</string>
- </tuple>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>func_defaults</string> </key>
- <value>
- <tuple>
- <string></string>
- <int>1</int>
- </tuple>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>Base_exportCsvFile</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFile.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFile.xml?rev=17926&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFile.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvFile.xml (removed)
@@ -1,229 +1,0 @@
-<?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>def cleanString(str):\n
- clean_item = str\n
- if clean_item.find(\'"\') != -1:\n
- clean_item = clean_item[1:-1].replace(\'""\', \'"\')\n
- else:\n
- if clean_item != \'\':\n
- if clean_item.find(\'.\') != -1:\n
- clean_item = float(clean_item)\n
- else:\n
- clean_item = int(clean_item)\n
- else:\n
- clean_item = None\n
- return clean_item\n
-\n
-def splitCsvLine(str_line):\n
- unclean_list = []\n
- pieces_of_line = str_line.split(\',\')\n
-\n
- p_stack = \'\'\n
- for p in pieces_of_line:\n
- if p_stack == \'\':\n
- p_stack = p\n
- else:\n
- p_stack += \',%s\' % p\n
- if p_stack.count(\'"\') % 2 == 0:\n
- unclean_list.append(p_stack)\n
- p_stack = \'\'\n
-\n
- return [cleanString(x) for x in unclean_list]\n
-\n
-request = context.REQUEST\n
-# Read first line (attribute\'s ids)\n
-first_line = import_file.readline()\n
-first_line = first_line.replace(\'\\n\', \'\')\n
-csv_property_list = splitCsvLine(first_line)\n
-# Read second line (attribute\'s titles)\n
-second_line = import_file.readline()\n
-\n
-# Read data lines\n
-method = context.activate\n
-\n
-i = 0\n
-for line in iter(import_file.readline, ""):\n
- # XXX Currently, if the file is too big, there is too many\n
- # activities created in only one transaction\n
- # We need to reduce the number of activities\n
- # Ex: create 1 activity which manages 100 lines, by created itself 100 \n
- # others activities\n
- i += 1\n
- line = line.replace(\'\\n\', \'\')\n
- csv_data_list = splitCsvLine(line)\n
-\n
- attribute_value_dict = dict([(csv_property_list[x], csv_data_list[x]) \\\n
- for x in xrange(len(csv_property_list))])\n
-\n
- method(priority=4, activity="SQLQueue", passive_commit=1).Base_importCsvLine(attribute_value_dict)\n
-redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+\'view\', \'portal_status_message=Importing+CSV+file.\')\n
-request[ \'RESPONSE\' ].redirect( redirect_url )\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>_owner</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string>import_file, **kw</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>1</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>import_file</string>
- <string>kw</string>
- <string>cleanString</string>
- <string>splitCsvLine</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>request</string>
- <string>first_line</string>
- <string>csv_property_list</string>
- <string>second_line</string>
- <string>method</string>
- <string>i</string>
- <string>_getiter_</string>
- <string>iter</string>
- <string>line</string>
- <string>csv_data_list</string>
- <string>dict</string>
- <string>append</string>
- <string>$append0</string>
- <string>xrange</string>
- <string>len</string>
- <string>x</string>
- <string>_getitem_</string>
- <string>attribute_value_dict</string>
- <string>redirect_url</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_importCsvFile</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvLine.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvLine.xml?rev=17926&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvLine.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_importCsvLine.xml (removed)
@@ -1,163 +1,0 @@
-<?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>if object_property_dict[\'uid\'] is None:\n
- object = None\n
-else:\n
- object = context.portal_catalog.getObject(object_property_dict[\'uid\'])\n
-\n
-if object == None:\n
- object = context.newContent()\n
-\n
-# activity doesn\'t support security rights yet...\n
-for key in [\'uid\',\'id\']:\n
- if object_property_dict.has_key(key):\n
- object_property_dict.pop(key)\n
-\n
-object.edit(**object_property_dict)\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>object_property_dict</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>1</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>object_property_dict</string>
- <string>_getitem_</string>
- <string>None</string>
- <string>object</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>_getiter_</string>
- <string>key</string>
- <string>_apply_</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_importCsvLine</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
More information about the Erp5-report
mailing list