Diff for /ECHO_content/ECHO_collection.py between versions 1.75 and 1.76

version 1.75, 2004/05/10 13:51:03 version 1.76, 2004/05/10 14:18:33
Line 105  def sendFile(self, filename, type): Line 105  def sendFile(self, filename, type):
     object = self      object = self
     # look for an object called filename      # look for an object called filename
     for path in paths:      for path in paths:
     print "fragment: '"+path+"'"  
         if hasattr(object, path):          if hasattr(object, path):
         print "  exists"  
         object = getattr(object, path)          object = getattr(object, path)
     else:      else:
         print "  doesn't exist"  
         object = None          object = None
         break          break
     if object:      if object:
     # if the object exists then send it      # if the object exists then send it
     print "send zope object"+object()      return object.index_html(self.REQUEST.REQUEST, self.REQUEST.RESPONSE)
     object()  
     else:      else:
     # send a local file with the given content-type      # send a local file with the given content-type
     fn = os.path.join(package_home(globals()), filename)      fn = os.path.join(package_home(globals()), filename)
     print "send fs file: "+fn  
     self.REQUEST.RESPONSE.setHeader("Content-Type", type)      self.REQUEST.RESPONSE.setHeader("Content-Type", type)
     self.REQUEST.RESPONSE.write(file(fn).read())      self.REQUEST.RESPONSE.write(file(fn).read())
     return      return
Line 1255  class ECHO_collection(Folder, Persistent Line 1250  class ECHO_collection(Folder, Persistent
   
     def area_img(self):      def area_img(self):
         """area image"""          """area image"""
         sendFile(self, 'images/red.gif', 'image/gif')          return sendFile(self, 'images/red.gif', 'image/gif')
         return   
   
     def hl_lib_js(self):      def hl_lib_js(self):
         """javascript"""          """javascript"""

Removed from v.1.75  
changed lines
  Added in v.1.76


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>