def __init__(self, *args, **kwargs): super(RichSkinChoiceField, self).__init__(*args, **kwargs) self.choices = [(skin.alias, skin.name) for skin in get_skins()]
def render(self, context): skins = get_skins() context[self.context_var] = skins return ''