equal
deleted
inserted
replaced
103 """Extends an existing dynaform. |
103 """Extends an existing dynaform. |
104 |
104 |
105 If any of dynainclude, dynaexclude or dynafields are not present, |
105 If any of dynainclude, dynaexclude or dynafields are not present, |
106 they are retrieved from dynaform (if present in it's Meta class). |
106 they are retrieved from dynaform (if present in it's Meta class). |
107 |
107 |
108 While it is rather useles to extend from a dynaform that does not have |
108 While it is rather useless to extend from a dynaform that does not have |
109 a Meta class, it is allowed, the resulting DynaForm is the same as if |
109 a Meta class, it is allowed, the resulting DynaForm is the same as if |
110 newDynaForm was called with all extendDynForm's keyword arguments. |
110 newDynaForm was called with all extendDynForm's keyword arguments. |
111 |
111 |
112 If append is True, the form's original values for include and |
112 If append is True, the form's original values for include and |
113 exclude will be appended to the supplied dynainclude and |
113 exclude will be appended to the supplied dynainclude and |
133 |
133 |
134 if append: |
134 if append: |
135 dynainclude += originclude |
135 dynainclude += originclude |
136 dynaexclude += origexclude |
136 dynaexclude += origexclude |
137 |
137 |
138 # The most intersting parameter, the 'extra fields' dictionary |
138 # The most interesting parameter, the 'extra fields' dictionary |
139 dynaconf = getattr(meta, 'dynaconf', {}) |
139 dynaconf = getattr(meta, 'dynaconf', {}) |
140 if not dynafields: |
140 if not dynafields: |
141 dynafields = dynaconf |
141 dynafields = dynaconf |
142 else: |
142 else: |
143 dicts.merge(dynafields, dynaconf) |
143 dicts.merge(dynafields, dynaconf) |