# HG changeset patch # User Sylvain Thénault # Date 1250157259 -7200 # Node ID 66b31686d92b86e75f847c0f2f9acc7123f00815 # Parent b864288fd316d58477639c063fb49d0f09be9552 rename registered to __registered__ diff -r b864288fd316 -r 66b31686d92b appobject.py --- a/appobject.py Thu Aug 13 11:49:56 2009 +0200 +++ b/appobject.py Thu Aug 13 11:54:19 2009 +0200 @@ -245,7 +245,7 @@ return '%s.%s' % (cls.__module__, cls.__name__) @classmethod - def registered(cls, registry): + def __registered__(cls, registry): """called by the registry when the appobject has been registered. It must return the object that will be actually registered (this may be diff -r b864288fd316 -r 66b31686d92b server/hooksmanager.py --- a/server/hooksmanager.py Thu Aug 13 11:49:56 2009 +0200 +++ b/server/hooksmanager.py Thu Aug 13 11:54:19 2009 +0200 @@ -217,8 +217,8 @@ self.event = event @classmethod - def registered(cls, vreg): - super(Hook, cls).registered(vreg) + def __registered__(cls, vreg): + super(Hook, cls).__registered__(vreg) return cls() @classmethod diff -r b864288fd316 -r 66b31686d92b vregistry.py --- a/vregistry.py Thu Aug 13 11:49:56 2009 +0200 +++ b/vregistry.py Thu Aug 13 11:54:19 2009 +0200 @@ -78,9 +78,7 @@ appobjects = self[oid] = [] else: appobjects = self.setdefault(oid, []) - # registered() is technically a classmethod but is not declared - # as such because we need to compose registered in some cases - appobject = obj.registered.im_func(obj, self) + appobject = obj.__registered__(self) assert not appobject in appobjects, \ 'object %s is already registered' % appobject assert callable(appobject.__select__), appobject diff -r b864288fd316 -r 66b31686d92b web/views/actions.py --- a/web/views/actions.py Thu Aug 13 11:49:56 2009 +0200 +++ b/web/views/actions.py Thu Aug 13 11:54:19 2009 +0200 @@ -158,14 +158,13 @@ order = 15 @classmethod - def registered(cls, vreg): - super(ManagePermissionsAction, cls).registered(vreg) + def __registered__(cls, vreg): if 'require_permission' in vreg.schema: cls.__select__ = (one_line_rset() & non_final_entity() & (match_user_groups('managers') | relation_possible('require_permission', 'subject', 'CWPermission', action='add'))) - return super(ManagePermissionsAction, cls).registered(vreg) + return super(ManagePermissionsAction, cls).__registered__(vreg) def url(self): return self.rset.get_entity(self.row or 0, self.col or 0).absolute_url(vid='security')