'Django: How to remove ":" from label_tag in django template?

I have a form in my django template:

{% for field in form %}
    <div class="fieldWrapper">
        <div class="row"><div class="col-12 col-md-6">{{ field.label_tag }}</div>
        <div class="col-12 col-md-6">{{ field }}</div></div><br>
    </div>
{% endfor %}

Each label is displayed as follows: label:

How do I remove the colons?



Solution 1:[1]

Hi you can add prettylabel like this;

{% for field in form %}
    <div class="fieldWrapper">
        <div class="row"><div class="col-12 col-md-6">{{ field.label_tag|prettytable }}</div>
        <div class="col-12 col-md-6">{{ field }}</div></div><br>
    </div>
{% endfor %}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 busra can