def get(self): return dict(category=dict(items=get_categories()))
def __init__(self, *args, **kwargs): super(VideoForm, self).__init__(*args, **kwargs) self.category.choices = [ (sc['id'], sc['name']) for sc in chain(*(c['sub_categories'] for c in get_categories()))]