[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py
Moved setting up event log until after registration, since
Jim Fulton
jim at zope.com
Sun Apr 2 12:59:16 EDT 2006
Log message for revision 66299:
Moved setting up event log until after registration, since
registration now generates events.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py 2006-04-02 16:59:13 UTC (rev 66298)
+++ Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py 2006-04-02 16:59:15 UTC (rev 66299)
@@ -134,10 +134,6 @@
>>> sio = StringIO.StringIO("some data")
>>> sio.filename = 'abc.txt'
- >>> def eventLog(event):
- ... print 'ModifiedEvent:', event.descriptions[0].attributes
- >>> zope.event.subscribers.append(eventLog)
-
Before we instanciate the request, we need to make sure that the
``IUserPreferredLanguages`` adapter exists, so that the request's
locale exists. This is necessary because the ``update_object``
@@ -150,6 +146,12 @@
>>> ztapi.provideAdapter(IHTTPRequest, IUserPreferredLanguages,
... BrowserLanguages)
+ We install an event logger so we can see the events generated:
+
+ >>> def eventLog(event):
+ ... print 'ModifiedEvent:', event.descriptions[0].attributes
+ >>> zope.event.subscribers.append(eventLog)
+
Let's make sure we can use the uploaded file name if one isn't
specified by the user, and can use the content type when
specified.
More information about the Zope3-Checkins
mailing list