[Answered ]-Django form field label as html

2👍

You can use template tags and filters anywhere in your Python code, just import them and use them:

from django.template.defaultfilters import safe

forms.RadioSelect(choices=[(o.choice_value, safe(o.choice_name))
    for o in Choice.objects.filter()])

Leave a comment