Changeset 490:6f116b86a226 in documentViewer for documentViewer.py
- Timestamp:
- Aug 29, 2011, 2:39:50 PM (13 years ago)
- Branch:
- elementtree
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r489 r490 3 3 from Products.PageTemplates.PageTemplateFile import PageTemplateFile 4 4 from App.ImageFile import ImageFile 5 from App.Common import rfc1123_date6 #from Products.ZSimpleFile.ZSimpleFile import ZSimpleFile7 5 from AccessControl import ClassSecurityInfo 8 6 from AccessControl import getSecurityManager … … 12 10 13 11 import os 14 import stat15 12 import sys 16 13 import urllib … … 21 18 import string 22 19 23 from SrvTxtUtils import getInt, getText, getHttpData 24 25 def logger(txt,method,txt2): 26 """logging""" 27 logging.info(txt+ txt2) 28 20 from SrvTxtUtils import getInt, getText, getHttpData, refreshingImageFileIndexHtml 29 21 30 22 def serializeNode(node, encoding="utf-8"): … … 107 99 return '/'.join(path.split('/')[0:-cnt]) 108 100 109 def devImageFileIndexHtml(self, REQUEST, RESPONSE):110 """index_html method for App.ImageFile that updates the file info for each request."""111 stat_info = os.stat(self.path)112 self.size = stat_info[stat.ST_SIZE]113 self.lmt = float(stat_info[stat.ST_MTIME]) or time.time()114 self.lmh = rfc1123_date(self.lmt)115 # call original method116 return ImageFile.index_html(self, REQUEST, RESPONSE)117 118 101 ## 119 102 ## documentViewer class … … 149 132 docuviewer_css = ImageFile('css/docuviewer.css',globals()) 150 133 # make ImageFile better for development 151 docuviewer_css.index_html = devImageFileIndexHtml134 docuviewer_css.index_html = refreshingImageFileIndexHtml 152 135 153 136
Note: See TracChangeset
for help on using the changeset viewer.