Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_buttons(**buttons):
- return [RadioField(name, choices=choices) for name, choices in buttons.items()]
- buttons_dict = {
- 'butname1': [
- ('name1.1', 'val1.1'),
- ('name1.2', 'val1.2')
- ],
- 'butname2': [
- ('name2.1', 'val2.1')
- ],
- }
- print(create_buttons(**buttons_dict))
Advertisement
Add Comment
Please, Sign In to add comment