From e821d791b5b0e5df2570c90325103a5880e2d4fa Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 21 May 2007 07:34:36 +0000 Subject: [PATCH] provide extended constructor for schema git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1751 fd906abe-77d9-0310-91a1-e0d9ade77398 --- composer/schema/__init__.py | 1 - composer/schema/schema.py | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/composer/schema/__init__.py b/composer/schema/__init__.py index 4bc90fb..38314f3 100644 --- a/composer/schema/__init__.py +++ b/composer/schema/__init__.py @@ -1,4 +1,3 @@ """ $Id$ """ - diff --git a/composer/schema/schema.py b/composer/schema/schema.py index 82e70b1..71ec87f 100644 --- a/composer/schema/schema.py +++ b/composer/schema/schema.py @@ -30,4 +30,11 @@ from cybertools.composer.base import Template class Schema(Template): - pass + def __init__(self, *fields): + super(Schema, self).__init__() + for f in fields: + self.components.append(f) + + @property + def fields(self): + return self.components