Usually the easiest way would be to do this in your CSS. label[for="id_condition"]{font-weight:bold;}if you only deal with browsers that have attribute selectors. Nowadays, that means everything except IE6. If you need to support IE6, you can wrap the field in a div and create it like this:
<div class="bold-my-labels">{{ form.condition.label_tag }}{{ form.condition }}</div>
<style type="text/css">.bold-my-labels label{font-weight:bold;}</style>
Finally, if you need to do this on the Python side, you can always embed HTML in your arg, a-la shortcut "<strong>My Condition is</strong>". But it will escape from HTML unless you mark it as safe, so in the end you will get:
from django.utils.safestring import mark_safe
...
condition = forms.TypedChoiceField(
label=mark_safe("<strong>My Condition is</strong>"),
...
)
source
share