[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/schemacontent/
Removed unused imports
Dmitry Vasiliev
dima at hlabs.spb.ru
Sun Aug 7 02:57:02 EDT 2005
Log message for revision 37762:
Removed unused imports
Changed:
U Zope3/trunk/src/zope/app/schemacontent/browser/__init__.py
U Zope3/trunk/src/zope/app/schemacontent/content.py
U Zope3/trunk/src/zope/app/schemacontent/instance.py
-=-
Modified: Zope3/trunk/src/zope/app/schemacontent/browser/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/browser/__init__.py 2005-08-06 14:52:28 UTC (rev 37761)
+++ Zope3/trunk/src/zope/app/schemacontent/browser/__init__.py 2005-08-07 06:57:02 UTC (rev 37762)
@@ -31,6 +31,7 @@
from zope.security.checker import CheckerPublic
from zope.security.proxy import removeSecurityProxy
+
class ContentComponentPermissionEdit(EditView):
def __init__(self, context, request):
@@ -40,7 +41,7 @@
def buildPermissionWidgets(self):
schema = self.context.schema
for name, field in getFieldsInOrder(schema):
-
+
# get the permissions and then the permission id.
# We can't deal in dropdownboxes with permission itself.
# There is no way to compare the permission to the
@@ -60,7 +61,7 @@
set_perm_id = None
else:
get_perm_id, set_perm_id = None, None
-
+
# Create the Accessor Permission Widget for this field
permField = Choice(
__name__=name+'_get_perm',
@@ -93,7 +94,7 @@
for name, field in getFieldsInOrder(schema):
getPermWidget = getattr(self, name+'_get_perm_widget')
setPermWidget = getattr(self, name+'_set_perm_widget')
-
+
# get the selected permission id from the from request
get_perm_id = getPermWidget.getInputValue()
set_perm_id = setPermWidget.getInputValue()
@@ -101,14 +102,14 @@
# get the right permission from the given id
get_perm = zapi.getUtility(IPermission, get_perm_id)
set_perm = zapi.getUtility(IPermission, set_perm_id)
-
+
# set the permission back to the instance
perms[name] = (get_perm, set_perm)
# update widget ohterwise we see the old value
getPermWidget.setRenderedValue(get_perm_id)
setPermWidget.setRenderedValue(set_perm_id)
-
+
status = 'Fields permissions mapping updated.'
return status
@@ -144,7 +145,7 @@
for name, util in zapi.getUtilitiesFor(
IContentComponentDefinition)
if name == type_name]
-
+
if not matching:
raise ComponentLookupError, \
"No Content Component Definition named '%s' found" %type_name
@@ -187,4 +188,3 @@
self.label = 'Edit %s' %context.__name__
super(EditContentComponentInstanceView, self).__init__(context,
request)
-
Modified: Zope3/trunk/src/zope/app/schemacontent/content.py
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/content.py 2005-08-06 14:52:28 UTC (rev 37761)
+++ Zope3/trunk/src/zope/app/schemacontent/content.py 2005-08-07 06:57:02 UTC (rev 37762)
@@ -17,20 +17,13 @@
"""
from persistent import Persistent
from persistent.dict import PersistentDict
-from zope.app import zapi
-from zope.app.i18n import ZopeMessageIDFactory as _
-from zope.app.annotation.interfaces import IAnnotations
-from zope.app.container.interfaces import IAdding
-from zope.app.component.interfaces.registration import ActiveStatus
from zope.app.container.contained import Contained
from zope.app.component.site import UtilityRegistration
-from zope.component.exceptions import ComponentLookupError
from zope.interface import directlyProvides, implements
from zope.schema import getFields
from zope.security.checker import CheckerPublic, Checker, defineChecker
-from zope.security.proxy import removeSecurityProxy
-from interfaces import IContentComponentDefinition
+from interfaces import IContentComponentDefinition
from interfaces import IContentComponentInstance
Modified: Zope3/trunk/src/zope/app/schemacontent/instance.py
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/instance.py 2005-08-06 14:52:28 UTC (rev 37761)
+++ Zope3/trunk/src/zope/app/schemacontent/instance.py 2005-08-07 06:57:02 UTC (rev 37762)
@@ -99,5 +99,3 @@
instance.__checker_setattr.get)
defineChecker(ContentComponentInstance, ContentComponentInstanceChecker)
-
-
More information about the Zope3-Checkins
mailing list