dyve/django-bootstrap-toolkit — pull request #35 by devfeng (2012-10-08 00:29:48+00:00)
Title: BUGFIX: missing prepend / append for TextInput widget

The "bootstrap" dict check in template has some issue.

{% if field.field.widget.bootstrap %}

The above code was added to support BootstrapDateInput. However, it removed the function to use prepend / append on regular TextInput field because it doesn't have the "bootstrap" field attribute.

For example, the below code in your sample code won't work:

{% for field in form %}
{% if field.name == 'disabled' %}
{% include "bootstrap_toolkit/field.html" with append='$' %}
{% else %}
{% if field.name != 'color' %}
{% include "bootstrap_toolkit/field.html" %}
{% endif %}
{% endif %}
{% endfor %}

Now this issue has been fixed by adding extra "prepend" and "append" check.

Also I simplified the code a little bit. Thanks.