diff -r cfa0c3f2dc19 -r ff8cc6b15e6a app/soc/views/helper/dynaform.py --- a/app/soc/views/helper/dynaform.py Sat Feb 21 15:57:02 2009 +0000 +++ b/app/soc/views/helper/dynaform.py Sat Feb 21 15:59:07 2009 +0000 @@ -65,7 +65,7 @@ def newDynaForm(dynamodel=None, dynabase=None, dynainclude=None, - dynaexclude=None, dynafields=None): + dynaexclude=None, dynaproperties=None): """Creates a new form DynaForm class. The returned class extends dynabase, but with the following additions: @@ -76,7 +76,7 @@ * The Meta class has an additional dynaconf field which is set to the dyanfields keyword argument passed to newDynaForm. - See DynaFormMetaclass for an explanation on how the dynafields + See DynaFormMetaclass for an explanation on how the dynaproperties property is used to construct the DynaForm class. """ @@ -93,16 +93,16 @@ model = dynamodel include = dynainclude exclude = dynaexclude - dynaconf = dynafields + dynaconf = dynaproperties return DynaForm def extendDynaForm(dynaform, dynainclude=None, dynaexclude=None, - dynafields=None, append=False): + dynaproperties=None, append=False): """Extends an existing dynaform. - If any of dynainclude, dynaexclude or dynafields are not present, + If any of dynainclude, dynaexclude or dynaproperties are not present, they are retrieved from dynaform (if present in it's Meta class). While it is rather useless to extend from a dynaform that does not have @@ -137,10 +137,10 @@ # The most interesting parameter, the 'extra fields' dictionary dynaconf = getattr(meta, 'dynaconf', {}) - if not dynafields: - dynafields = dynaconf + if not dynaproperties: + dynaproperties = dynaconf else: - dicts.merge(dynafields, dynaconf) + dicts.merge(dynaproperties, dynaconf) # Create a new DynaForm, using the properties we extracted return newDynaForm( @@ -148,4 +148,4 @@ dynabase=dynaform, dynainclude=dynainclude, dynaexclude=dynaexclude, - dynafields=dynafields) + dynaproperties=dynaproperties)