From 88cb056b198674b712fb2a20c488d8ed37349e89 Mon Sep 17 00:00:00 2001 From: Adam Alton Date: Sat, 15 Feb 2014 22:02:10 +0000 Subject: [PATCH 1/2] Removing |safe filter from help_text. There's no reason to assume that it's safe. --- bootstrapform/templates/bootstrapform/field.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrapform/templates/bootstrapform/field.html b/bootstrapform/templates/bootstrapform/field.html index bfbdf64..a636701 100644 --- a/bootstrapform/templates/bootstrapform/field.html +++ b/bootstrapform/templates/bootstrapform/field.html @@ -15,7 +15,7 @@ {% if field.help_text %}

- {{ field.help_text|safe }} + {{ field.help_text }}

{% endif %} @@ -40,7 +40,7 @@ {% if field.help_text %}

- {{ field.help_text|safe }} + {{ field.help_text }}

{% endif %} @@ -58,7 +58,7 @@ {% if field.help_text %}

- {{ field.help_text|safe }} + {{ field.help_text }}

{% endif %} From c7656d04f524b51dd07baab35357130f25d44141 Mon Sep 17 00:00:00 2001 From: Adam Alton Date: Sat, 11 Oct 2014 17:06:37 +0100 Subject: [PATCH 2/2] Adding another usage example to the README. --- README.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 98cd911..5dfa95a 100644 --- a/README.rst +++ b/README.rst @@ -6,17 +6,17 @@ Django bootstrap form :alt: PyPI version :target: https://pypi.python.org/pypi/django-bootstrap-form -.. image:: https://travis-ci.org/tzangms/django-bootstrap-form.png?branch=master +.. image:: https://travis-ci.org/tzangms/django-bootstrap-form.png?branch=master :target: https://travis-ci.org/tzangms/django-bootstrap-form -.. image:: https://coveralls.io/repos/tzangms/django-bootstrap-form/badge.png?branch=master +.. image:: https://coveralls.io/repos/tzangms/django-bootstrap-form/badge.png?branch=master :target: https://coveralls.io/r/tzangms/django-bootstrap-form?branch=master .. image:: https://d2weczhvl823v0.cloudfront.net/tzangms/django-bootstrap-form/trend.png :alt: Bitdeli badge :target: https://bitdeli.com/free - + Twitter Bootstrap for Django Form. @@ -32,8 +32,13 @@ Use it like this, simple. {{ form|bootstrap }} +or + +.. code-block:: + {{ form.field_name|bootstrap }} + Demo ===== -Checkout this `Demo site `_ to see it in action. +Checkout this `Demo site `_ to see it in action.