[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - contents.py:1.1.2.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Dec 2002 02:10:46 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv20518
Modified Files:
Tag: NameGeddon-branch
contents.py
Log Message:
- fix & clean up imports
- normalize whitespace
=== Zope3/src/zope/app/browser/container/contents.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/browser/container/contents.py:1.1.2.2 Mon Dec 23 18:52:28 2002
+++ Zope3/src/zope/app/browser/container/contents.py Tue Dec 24 02:10:46 2002
@@ -1,28 +1,29 @@
-##############################################################################
+o##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
Revision information: $Id$
"""
-from zope.publisher.browser import BrowserView
-from Zope.App.PageTemplate import ViewPageTemplateFile
from zope.app.interfaces.container import IContainer
-from zope.component \
- import queryView, getView, queryAdapter, getAdapter
+from zope.app.interfaces.container import IZopeContainer
from zope.app.interfaces.dublincore import IZopeDublinCore
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+
+from zope.component import queryView, getView, queryAdapter, getAdapter
from zope.proxy.context import ContextWrapper
-from zope.app.interfaces.container import IZopeContainer
+from zope.publisher.browser import BrowserView
+
class Contents(BrowserView):
@@ -52,7 +53,7 @@
created = dc.created
if created is not None:
info['created'] = formatTime(created)
-
+
modified = dc.modified
if modified is not None:
info['modified'] = formatTime(modified)
@@ -67,7 +68,7 @@
container.__delitem__(id)
self.request.response.redirect('@@contents.html')
-
+
def listContentInfo(self):
return map(self._extractContentInfo, self.context.items())
@@ -97,7 +98,7 @@
#SteveA recommneded that getSize return
#a tuple (magnitude, (size, text_label))
#this way we can sort things intelligibly
-#that dont have sizes.
+#that don't have sizes.
def getSize(obj):
try:
@@ -113,4 +114,3 @@
else:
result = "%d KB" % (size / 1024.0)
return (size, result)
-