[ppa-qps-devel] Re: =?KOI8-R?B?0M/M0SDLydLQyd7FyiDXIPLp?=
Brought to you by:
ods
From: Denis S. O. <od...@st...> - 2003-04-03 13:05:15
|
On Thu, 3 Apr 2003, Alexey Melchakov wrote: AM> > class MakedEditObject(qWebUtils.MakedObject): AM> > def __init__(self, object, base_dir='', AM> template_getter=None, AM> > field_template_getter=None, edUser=None, AM> > edPrefix=Edit.prefix AM> , AM> > global_namespace={}, dynamic=0): Параметры user и prefix должны быть обязательными. И какой здесь смысл в dynamic? AM> > if object.id=='NEW': AM> > if getattr(object.stream, 'virtual', None) and AM> \ AM> > getattr(object.stream.virtual, AM> 'paramStreams', None) and AM> > \ name in AM> object.stream.virtual.paramStreams.keys(): AM> > value = getattr(object.stream, name) AM> > setattr(object, name, value) AM> > AM> > return fieldType.show(self, name, AM> user=self.edUser) Да, это должно быть не здесь, а в классе кирпича запрятано - фактически это инициализация значением поумолчанию, обеспечивающим нахождение кирпича в этом потоке. -- Denis S. Otkidach http://www.python.ru/ [ru] |