Commit 18347abe authored by Roque's avatar Roque

erp5_officejs_appstore_base: fix dynamic appstore home json generation

parent f3c88876
...@@ -3,7 +3,7 @@ from DateTime import DateTime ...@@ -3,7 +3,7 @@ from DateTime import DateTime
portal = context.getPortalObject() portal = context.getPortalObject()
preference_tool = portal.portal_preferences preference_tool = portal.portal_preferences
software_product_list = portal.portal_catalog(portal_type='Software Product', validation_state='validated') software_product_list = portal.portal_catalog(portal_type='Software Product', validation_state='validated', sort_on='creation_date')
appstore_data = [] appstore_data = []
logo_url_list = [] logo_url_list = []
i = 0 i = 0
...@@ -31,8 +31,8 @@ for software_product in software_product_list: ...@@ -31,8 +31,8 @@ for software_product in software_product_list:
"application_image_type": 'image', "application_image_type": 'image',
"application_image_url": logo.getReference(), "application_image_url": logo.getReference(),
"application_toc_accept": 'true', "application_toc_accept": 'true',
"application_published": 'some_date', "application_published": web_section.getModificationDate().strftime("%m/%d/%Y"),
"application_submitted": 'other_date', "application_submitted": web_section.getModificationDate().strftime("%m/%d/%Y"),
"application_description": data["description"] if "description" in data else data["name"], "application_description": data["description"] if "description" in data else data["name"],
"application_url": "%s://%s.%s/" % (preference_tool.getPreferredSystemAppstoreWildcardProtocol(), "application_url": "%s://%s.%s/" % (preference_tool.getPreferredSystemAppstoreWildcardProtocol(),
app_domain, app_domain,
......
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