[Grok-dev] Re: model schema declaration
Philipp von Weitershausen
philipp at weitershausen.de
Thu Jul 19 07:33:49 EDT 2007
Martijn Faassen wrote:
> Philipp von Weitershausen wrote:
>> Leonardo Rochael Almeida wrote:
>>> The other day, Luciano and Martijn where talking about the deprecated
>>> inner class idiom for schema declaration
>>
>> Deprecated? Have I missed something? WHen did we deprecate this?
>
> I want to deprecate and get rid of the inner 'fields' class. It doesn't
> work well with subclassing, and it doesn't seem to add very much in
> brevity. It's also rather magic and leads to all kinds of questions that
> are easily solved if you switch to an explicit schema.
Ok.
>> Too much magic and, as you say yourself, only active after grokking...
>
> I think we shouldn't stop exploring some forms of automatic assocation
> though. The question is how much this magic actually hurts things. I
> think it likely hurts far less than the inner 'fields' class. :)
>
>> If you want something quick'n'dirty, inline the schema fields into the
>> form's form_fields or put them on the Model class.
>
> Inlining the fields is one approach. What do you mean by 'put them on
> the Model' class, though?
I meant the inner 'fields' class.
--
http://worldcookery.com -- Professional Zope documentation and training
More information about the Grok-dev
mailing list