Package rubacon :: Package utility :: Module helpers
[hide private]
[frames] | no frames]

Source Code for Module rubacon.utility.helpers

 1   
2 -def get_attr_list_from_model(model, cl):
3 """Get the list of attrs from the model for the given class""" 4 selected = -1 5 for i in range(0, len(model['classDefs'])): 6 if model['classDefs'][i]['name'] == cl: 7 attrs = model['classDefs'][i]['attrs'] 8 break 9 # I want them sorted, so they are never mixed up 10 # in their order 11 if attrs == None: 12 return None 13 attrs.sort() 14 return attrs
15
16 -def get_attrs_from_class(cl):
17 """A simple helper that is needed to keep the order of the args.""" 18 attrs = cl['attrs'] 19 attrs.sort() 20 return attrs
21