[Erp5-report] r32002 jp - /erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 26 23:51:39 CET 2010
Author: jp
Date: Tue Jan 26 23:51:36 2010
New Revision: 32002
URL: http://svn.erp5.org?rev=32002&view=rev
Log:
Various comments for needed improvements added to the code.
Modified:
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getCategoryList.xml
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_css.xml
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_images.xml
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getCategoryList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getCategoryList.xml?rev=32002&r1=32001&r2=32002&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getCategoryList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getCategoryList.xml [utf8] Tue Jan 26 23:51:36 2010
@@ -54,17 +54,22 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
- This script returns the list of category (or tags) that are available in the current web section.\n
+ This script returns the list of category (or tags) which are available in the current web section.\n
It returns a python list of Category object. A Category object is really simple, as it has just \n
one property with a getter and a setter : title.\n
-"""\n
+\n
+ TODO: XXX-JPS\n
+ - this is way too slow - it will collapse the system\n
+ - have a look at mailreader code - there is something doing the same\n
+ - consider using virtual domains possibly - again look in email reader code\n
+""" \n
\n
\n
## First step : retrieve the raw list\n
current_section = context.getWebSectionValue()\n
subject_list = []\n
\n
-for item in current_section.WebSection_getDocumentValueList():\n
+for item in current_section.WebSection_getDocumentValueList(): # XXX-JPS - this will fail for performance reasons\n
subject_list.extend([x for x in item.getSubjectList() if not x in subject_list])\n
\n
## Now, build the object list so that a Listbox can be used to display the results of this script.\n
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml?rev=32002&r1=32001&r2=32002&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml [utf8] Tue Jan 26 23:51:36 2010
@@ -57,22 +57,26 @@
This script returns the blog post that must be displayed in the current section.\n
The blog post are filtered through the tag parameter that is retrieved through\n
the GET parameters.\n
+\n
+ TODO: XXX-JPS\n
+ - why don\'t you explicitly define subject as a parameter of the method\n
+ - again, way too slow if this returns 1,000,000 documents\n
+ - appropriate way is to either call context.getDocumentValueList(subject=subject, **kw)\n
+ or context.getDocumentValueList(subject=subject), depending on your goal\n
+ what about ordering ...\n
"""\n
\n
request = container.REQUEST\n
\n
-requested_tag = request.get(\'tag\')\n
+requested_tag = request.get(\'tag\') # XXX-JPS it would be better to use subject which is the normal term in ERP5\n
current_section = context.getWebSectionValue()\n
result = []\n
-for item in current_section.WebSection_getDocumentValueList():\n
+for item in current_section.WebSection_getDocumentValueList(): # XXX-JPS this could be way too slow\n
if requested_tag is not None:\n
if requested_tag in item.getSubjectList():\n
result.append(item)\n
else:\n
result.append(item)\n
-\n
-result.sort(key = lambda x: x.effective_date)\n
-result = result[::-1]\n
\n
return result\n
</string> </value>
@@ -122,7 +126,6 @@
<string>_getiter_</string>
<string>item</string>
<string>None</string>
- <string>_getitem_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_css.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_css.xml?rev=32002&r1=32001&r2=32002&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_css.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_css.xml [utf8] Tue Jan 26 23:51:36 2010
@@ -21,7 +21,7 @@
</item>
<item>
<key> <string>title</string> </key>
- <value> <string></string> </value>
+ <value> <string>XXX-JPS - how is css added to the list of CSS of a web site ? section ?</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_images.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_images.xml?rev=32002&r1=32001&r2=32002&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_images.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/blog_images.xml [utf8] Tue Jan 26 23:51:36 2010
@@ -21,7 +21,7 @@
</item>
<item>
<key> <string>title</string> </key>
- <value> <string></string> </value>
+ <value> <string>XXX-JPS - no plurals in ERP5 - rename</string> </value>
</item>
</dictionary>
</pickle>
More information about the Erp5-report
mailing list