diff options
author | makkalot <makkalot@gmail.com> | 2008-06-29 13:31:58 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-06-29 13:31:58 +0300 |
commit | 372d28b8443dd6b3fff17985cc511fadc79a6cf8 (patch) | |
tree | d34ac216a55259c0221a5573ca3c4f0e3b3c8580 /funcweb | |
parent | 621bff456b2c3fdbb9a7218bb1008ff75726054d (diff) | |
download | func-372d28b8443dd6b3fff17985cc511fadc79a6cf8.tar.gz func-372d28b8443dd6b3fff17985cc511fadc79a6cf8.tar.xz func-372d28b8443dd6b3fff17985cc511fadc79a6cf8.zip |
fixing some silly errors, unittests are cool :)
Diffstat (limited to 'funcweb')
-rw-r--r-- | funcweb/funcweb/widget_automation.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/funcweb/funcweb/widget_automation.py b/funcweb/funcweb/widget_automation.py index 3cdccd4..ed127e1 100644 --- a/funcweb/funcweb/widget_automation.py +++ b/funcweb/funcweb/widget_automation.py @@ -26,9 +26,9 @@ class WidgetListFactory(object): 'default_value':"TextField", }, 'hash':{ - 'default_value':"RepeatingInputWidget"}, + 'type':"RepeatingFieldSet"}, 'list':{ - 'default_value':"RepeatingInputWidget"} + 'type':"RepeatingFieldSet"} } #will contain the input widget created in that class @@ -136,8 +136,9 @@ class WidgetListFactory(object): } #create the RepeatingFieldSet object and add it to global list like you do for others - temp_object = getattr(widgets,self.__convert_table[argument['type']]['default'])(**hash_repeat_data) - #add the commno options + temp_object = getattr(widgets,self.__convert_table[argument['type']]['type'])(**hash_repeat_data) + #print temp_object.fields + #add the common options self.__add_commons_to_object(temp_object,argument,argument_name) #add a new entry to final list self.__widget_list[argument_name]=temp_object @@ -159,14 +160,13 @@ class WidgetListFactory(object): """ list_repeat_data = { 'template':"sampleapp.templates.repeater_form",#may change that if someone doesnt like my design :) - 'name':'listrepeat', 'fields' : [ widgets.TextField(name="listfield",label="List Field") ], } #create the RepeatingFieldSet object and add it to global list like you do for others - temp_object = getattr(widgets,self.__convert_table[argument['type']]['default'])(**hash_repeat_data) + temp_object = getattr(widgets,self.__convert_table[argument['type']]['type'])(**list_repeat_data) #add the commno options self.__add_commons_to_object(temp_object,argument,argument_name) #add a new entry to final list |