[Zope3-dev] schema initial documentation

faassen@vet.uu.nl faassen@vet.uu.nl
Mon, 22 Apr 2002 22:00:42 +0200


On Mon, Apr 22, 2002 at 07:17:21PM +0300, Myroslav Opyr wrote:
> In warp-framework there is much shorter form, translated into your 
> shema-style it should be:
> 
>            StringField(self, "initials")
> 
> Which would be equal to the call above. Everything else could be 
> calulated (automagically guessed)
> 
>           StringField(self, "first_name")
> 
> Would be equal to:
> 
>           first_name = StringField(
>              title="First Name",
>              description="First Name.",
>              )

But title and description shouldn't be guessed; they should be set by the
user (and as was pointed out even that may not be enough as one has to
deal with i8n). That they are similar to the name of the id here is 
not always the case, for instance:

postal_code = StringField(
    title="ZIP code",
    description="Your ZIP or postcal code.",
    )

Of course I do agree that most of the field properties should have sensible
defaults.

Regards,

Martijn