Package orm2 :: Package ui :: Module procedure
[hide private]
[frames] | no frames]

Source Code for Module orm2.ui.procedure

 1  #!/usr/bin/env python 
 2  # -*- coding: iso-8859-1 -*- 
 3   
 4  ##  This file is part of orm, The Object Relational Membrane Version 2. 
 5  ## 
 6  ##  Copyright 2002-2006 by Diedrich Vorberg <diedrich@tux4web.de> 
 7  ## 
 8  ##  All Rights Reserved 
 9  ## 
10  ##  For more Information on orm see the README file. 
11  ## 
12  ##  This program is free software; you can redistribute it and/or modify 
13  ##  it under the terms of the GNU General Public License as published by 
14  ##  the Free Software Foundation; either version 2 of the License, or 
15  ##  (at your option) any later version. 
16  ## 
17  ##  This program is distributed in the hope that it will be useful, 
18  ##  but WITHOUT ANY WARRANTY; without even the implied warranty of 
19  ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
20  ##  GNU General Public License for more details. 
21  ## 
22  ##  You should have received a copy of the GNU General Public License 
23  ##  along with this program; if not, write to the Free Software 
24  ##  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
25  ## 
26  ##  I have added a copy of the GPL in the file gpl.txt. 
27   
28 -class procedure:
29 - def __init__(self, context, formdata):
30 self.__context__ = context 31 self.__formdata__ = formdata 32 33 for name, value in formdata.items(): 34 setattr(self, name, value)
35
36 - def __getattr__(self, name):
37 """ 38 This will hook the procedure into Zope's acquisition mechanism. 39 """ 40 return getattr(self.__context__, name)
41 42 # Local variables: 43 # mode: python 44 # ispell-local-dictionary: "english" 45 # End: 46