Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
e0bb4bde
Commit
e0bb4bde
authored
Mar 12, 2015
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: use Base_getWebDocumentDrivenModificationDate to get last Modified Date
parent
017770a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
2 deletions
+94
-2
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_getWebDocumentDrivenModificationDate.xml
...ns/erp5_web/Base_getWebDocumentDrivenModificationDate.xml
+84
-0
bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
+10
-2
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_getWebDocumentDrivenModificationDate.xml
0 → 100644
View file @
e0bb4bde
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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>
from Products.ERP5Type.Cache import CachingMethod\n
\n
def getLatestModificationDate():\n
document = context.getPortalObject().portal_catalog(\n
portal_type=("Web Page", "Web Section", "Web Site", "Image"),\n
sort_on=((\'modification_date\', \'descending\'),),\n
select_list=(\'modification_date\',),\n
limit=1,\n
)\n
return document[0].modification_date\n
\n
getLatestModificationDate = CachingMethod(\n
getLatestModificationDate,\n
id="Base_getWebDocumentDrivenModificationDate",\n
cache_factory="erp5_content_short",\n
)\n
\n
return getLatestModificationDate()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getWebDocumentDrivenModificationDate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
View file @
e0bb4bde
...
@@ -255,7 +255,7 @@
...
@@ -255,7 +255,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_max_age_secs
</string>
</key>
<key>
<string>
_max_age_secs
</string>
</key>
<value>
<int>
3
00
</int>
</value>
<value>
<int>
6
00
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_mtime_func
</string>
</key>
<key>
<string>
_mtime_func
</string>
</key>
...
@@ -319,6 +319,14 @@
...
@@ -319,6 +319,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
_stale_if_error_secs
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
_stale_while_revalidate_secs
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<item>
<key>
<string>
_vary
</string>
</key>
<key>
<string>
_vary
</string>
</key>
<value>
<string>
Accept-Language, Cookie
</string>
</value>
<value>
<string>
Accept-Language, Cookie
</string>
</value>
...
@@ -433,7 +441,7 @@
...
@@ -433,7 +441,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: getattr(object, \'
get
ModificationDate\', object.modified)()
</string>
</value>
<value>
<string>
python: getattr(object, \'
Base_getWebDocumentDriven
ModificationDate\', object.modified)()
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment