Skip to content

Commit 373526d

Browse files
committed
Merge branch 'release/4.8.0'
2 parents da192e2 + ecf198f commit 373526d

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

bootstrap3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = '4.7.1'
3+
__version__ = '4.8.0'

bootstrap3/bootstrap.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'horizontal_label_class': 'col-md-2',
1818
'horizontal_field_class': 'col-md-4',
1919
'set_required': True,
20+
'set_placeholder': True,
2021
'form_required_class': '',
2122
'form_error_class': '',
2223
'formset_renderers':{

bootstrap3/renderers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ def __init__(self, field, *args, **kwargs):
173173
self.field_help = text_value(mark_safe(field.help_text)) if self.show_help and field.help_text else ''
174174
self.field_errors = [conditional_escape(text_value(error)) for error in field.errors]
175175

176-
self.placeholder = field.label
176+
if get_bootstrap_setting('set_placeholder'):
177+
self.placeholder = field.label
178+
else:
179+
self.placeholder = ''
177180

178181
self.addon_before = kwargs.get('addon_before', '')
179182
self.addon_after = kwargs.get('addon_after', '')

bootstrap3/tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def render_field(field, **context_args):
124124
class SettingsTest(TestCase):
125125
def test_settings(self):
126126
from .bootstrap import BOOTSTRAP3
127-
128127
self.assertTrue(BOOTSTRAP3)
129128

130129
def test_settings_filter(self):

docs/installation.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ In your project, you should add ``django-bootstrap3`` to your ``requirements.txt
1414

1515
Be sure to use ``virtualenv`` if you develop python projects.
1616

17+
Add to INSTALLED_APPS in your ``settings.py``:
18+
19+
``'bootstrap3',``
20+
1721
After installation, the :doc:`quickstart` will get you on your way to using ``django-bootstrap3``.

0 commit comments

Comments
 (0)