# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234891052 -3600 # Node ID 4f4a34346e9b64166f57bda2fd9eabc8abf795a5 # Parent d95936d6ce5ccd879888d22dd41b6065cd501acc fix initializers diff -r d95936d6ce5c -r 4f4a34346e9b common/appobject.py --- a/common/appobject.py Tue Feb 17 17:46:17 2009 +0100 +++ b/common/appobject.py Tue Feb 17 18:17:32 2009 +0100 @@ -64,15 +64,15 @@ return cls @classmethod - def selected(cls, req, rset, row=None, col=None, **kwargs): + def selected(cls, *args, **kwargs): """by default web app objects are usually instantiated on selection according to a request, a result set, and optional row and col """ - instance = cls(req, rset) - instance.row = row - instance.col = col - instance.sel_kwargs = kwargs + instance = cls(*args) + instance.row = kwargs.pop('row', None) + instance.col = kwargs.pop('col', None) + instance.selection_kwargs = kwargs return instance # Eproperties definition: @@ -100,7 +100,7 @@ return '%s.%s.%s' % (cls.__registry__, cls.id, propid) - def __init__(self, req, rset): + def __init__(self, req=None, rset=None): super(AppRsetObject, self).__init__() self.req = req self.rset = rset diff -r d95936d6ce5c -r 4f4a34346e9b common/view.py --- a/common/view.py Tue Feb 17 17:46:17 2009 +0100 +++ b/common/view.py Tue Feb 17 18:17:32 2009 +0100 @@ -100,7 +100,7 @@ add_to_breadcrumbs = True category = 'view' - def __init__(self, req, rset): + def __init__(self, req=None, rset=None): super(View, self).__init__(req, rset) self.w = None