[Zope3-checkins] CVS: Zope3/src/zope/app/i18nfile/browser - i18nfile.py:1.3 i18nimage.py:1.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Mar 18 22:18:15 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/i18nfile/browser
In directory cvs.zope.org:/tmp/cvs-serv2488/src/zope/app/i18nfile/browser

Modified Files:
	i18nfile.py i18nimage.py 
Log Message:


Modernized the File and Image API to rely more heavily on schemas instead of
accessor and mutator methods. Removed a lot of unnecessary cruft from the
object classes and their views.


=== Zope3/src/zope/app/i18nfile/browser/i18nfile.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/i18nfile/browser/i18nfile.py:1.2	Tue Feb 24 11:50:08 2004
+++ Zope3/src/zope/app/i18nfile/browser/i18nfile.py	Thu Mar 18 22:17:41 2004
@@ -57,6 +57,7 @@
             if addLanguage:
                 language = newLanguage
             self.context.setDefaultLanguage(defaultLanguage)
-            self.context.edit(data, contentType, language)
+            self.context.setData(data, language)
+            self.context.contentType = contentType
         return self.request.response.redirect(self.request.URL[-1] +
                       "/editForm.html?language=%s" %language)  # XXX url_quote


=== Zope3/src/zope/app/i18nfile/browser/i18nimage.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/i18nfile/browser/i18nimage.py:1.2	Tue Feb 24 11:50:08 2004
+++ Zope3/src/zope/app/i18nfile/browser/i18nimage.py	Thu Mar 18 22:17:41 2004
@@ -45,7 +45,8 @@
             if addLanguage:
                 language = newLanguage
             self.context.setDefaultLanguage(defaultLanguage)
-            self.context.edit(data, contentType, language)
+            self.context.setData(data, language)
+            self.context.contentType = contentType
         return self.request.response.redirect(self.request.URL[-1] +
                       "/editForm.html?language=%s" % language)  # XXX url_quote
 




More information about the Zope3-Checkins mailing list