[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser - ImageData.py:1.1.2.4.4.2 browser.zcml:1.1.2.5.2.1 edit.pt:1.1.2.3.8.1

Jim Fulton jim@zope.com
Sun, 2 Jun 2002 10:35:19 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv29793/lib/python/Zope/App/OFS/Content/Image/Views/Browser

Modified Files:
      Tag: Zope3InWonderland-branch
	ImageData.py browser.zcml edit.pt 
Log Message:
- Added template attribute to allow views to be created from a
  template source file.

- Added beginnings of a Zope debugger. This required seperating site
  and server configuration.

- Added the ability to specify a config file package in the
  zopeConfigure directive. Made "config.zcml" a default for the file
  attribute in the include directive.

- Fixed mapply to unwrap proxied objects. This was necessary once
  views became wrapped in proxies. We need to investigate why they
  weren't being wrapped before. 

- I updated enough system page templates and zcml directives so that:

  - Zope now starts. :)

  - The root folder contents listing can be viewed.

  Many more templates and zcml files need to be updated to reflect the
  way views are now handled.



=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/ImageData.py 1.1.2.4.4.1 => 1.1.2.4.4.2 ===
 class ImageData(BrowserView):
 
-    def index(self, REQUEST=None):        
+    def __call__(self):        
         image = self.context
-        if REQUEST is not None:
-            REQUEST.getResponse().setHeader('content-type',
-                                          image.getContentType()) 
+        if self.request is not None:
+            self.request.getResponse().setHeader('content-type',
+                                                 image.getContentType()) 
         return image.getData()
 
 


=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/browser.zcml 1.1.2.5 => 1.1.2.5.2.1 ===
   <!-- Image View Directives -->
 
-  <browser:defaultView name="view"
+  <browser:defaultView 
+    name="data"
     for="Zope.App.OFS.Content.Image.Image.IImage."
+    permission_id="Zope.View"
+    allowed_attributes="__call__, tag"
     factory=".ImageData." />
 
-  <browser:view name="data"
+  <browser:view
     for="Zope.App.OFS.Content.Image.Image.IImage."
-    factory=".ImageData." />
-
-  <security:protectClass 
-     class=".ImageData."
-     permission_id="Zope.View"
-     names="index, tag" />
+    permission_id="Zope.ManageContent"
+    factory=".ImageEdit.">
 
-  <browser:view name="edit"
-    for="Zope.App.OFS.Content.Image.Image.IImage."
-    factory=".ImageEdit." />
+    <browser:page name="editForm.html"
+                  attribute="index"
+                  />
+    <browser:page name="edit.html"
+                  attribute="action"
+                  />
 
-  <security:protectClass 
-     class=".ImageEdit."
-     permission_id="Zope.View"
-     names="index, action" />
+  </browser:view>
 
 
   <!-- Formulator directives -->


=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/edit.pt 1.1.2.3 => 1.1.2.3.8.1 ===
       </div>
 
-      <form action="action" method="post" enctype="multipart/form-data">
+      <form action="edit.html" method="post" enctype="multipart/form-data">
 
         <table class="EditTable">      
 	  <tbody>