Skip to content

Commit 47e5492

Browse files
committed
Merge branch 'release/5.3.0'
2 parents afa9d65 + 8174636 commit 47e5492

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

HISTORY.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ History
44
-------
55

66

7-
5.2.0 (2015-03-20)
7+
5.3.0 (2015-04-08)
88
++++++++++++++++++
99

10-
* Various bug fixes and improvements
10+
* Fix Django 1.8 importlib warnings
11+
* Set defaults for horizontal-form to col-md-3 for label, col-md-9 for field
12+
* Various bug fixes
1113

1214

1315
5.2.0 (2015-03-25)

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__ = '5.2.0'
3+
__version__ = '5.3s.0'

bootstrap3/bootstrap.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
from django.conf import settings
55
try:
6-
from django.utils.importlib import import_module
7-
except ImportError:
86
from importlib import import_module
7+
except ImportError:
8+
from django.utils.importlib import import_module
99

1010

1111
# Default settings
@@ -17,8 +17,8 @@
1717
'javascript_url': None,
1818
'javascript_in_head': False,
1919
'include_jquery': False,
20-
'horizontal_label_class': 'col-md-2',
21-
'horizontal_field_class': 'col-md-4',
20+
'horizontal_label_class': 'col-md-3',
21+
'horizontal_field_class': 'col-md-9',
2222
'set_required': True,
2323
'set_placeholder': True,
2424
'required_css_class': '',

bootstrap3/forms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ def render_formset(formset, **kwargs):
2929
return renderer_cls(formset, **kwargs).render()
3030

3131

32-
def render_formset_errors(form, **kwargs):
32+
def render_formset_errors(formset, **kwargs):
3333
"""
3434
Render formset errors to a Bootstrap layout
3535
"""
3636
renderer_cls = get_formset_renderer(**kwargs)
37-
return renderer_cls(form, **kwargs).render_errors()
37+
return renderer_cls(formset, **kwargs).render_errors()
3838

3939

4040
def render_form(form, **kwargs):
4141
"""
42-
Render a formset to a Bootstrap layout
42+
Render a form to a Bootstrap layout
4343
"""
4444
renderer_cls = get_form_renderer(**kwargs)
4545
return renderer_cls(form, **kwargs).render()
@@ -55,7 +55,7 @@ def render_form_errors(form, type='all', **kwargs):
5555

5656
def render_field(field, **kwargs):
5757
"""
58-
Render a formset to a Bootstrap layout
58+
Render a field to a Bootstrap layout
5959
"""
6060
renderer_cls = get_field_renderer(**kwargs)
6161
return renderer_cls(field, **kwargs).render()

bootstrap3/templatetags/bootstrap3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ def bootstrap_formset(*args, **kwargs):
234234
@register.simple_tag
235235
def bootstrap_formset_errors(*args, **kwargs):
236236
"""
237-
Render form errors
237+
Render formset errors
238238
239239
**Tag name**::
240240
241-
bootstrap_form_errors
241+
bootstrap_formset_errors
242242
243243
**Parameters**:
244244
@@ -247,11 +247,11 @@ def bootstrap_formset_errors(*args, **kwargs):
247247
248248
**usage**::
249249
250-
{% bootstrap_form_errors form %}
250+
{% bootstrap_formset_errors formset %}
251251
252252
**example**::
253253
254-
{% bootstrap_form_errors form layout='inline' %}
254+
{% bootstrap_formset_errors formset layout='inline' %}
255255
"""
256256
return render_formset_errors(*args, **kwargs)
257257

bootstrap3/tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def test_layout_horizontal(self):
232232
form = TestForm()
233233
res = render_template(
234234
'{% bootstrap_form form layout="horizontal" %}', form=form)
235-
self.assertIn('col-md-2', res)
236-
self.assertIn('col-md-4', res)
235+
self.assertIn('col-md-3', res)
236+
self.assertIn('col-md-9', res)
237237
res = render_template(
238238
'{% bootstrap_form form layout="horizontal" ' +
239239
'horizontal_label_class="hlabel" ' +
@@ -247,8 +247,8 @@ def test_buttons_tag(self):
247247
form = TestForm()
248248
res = render_template(
249249
'{% buttons layout="horizontal" %}{% endbuttons %}', form=form)
250-
self.assertIn('col-md-2', res)
251-
self.assertIn('col-md-4', res)
250+
self.assertIn('col-md-3', res)
251+
self.assertIn('col-md-9', res)
252252

253253

254254
class FieldTest(TestCase):

docs/settings.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ The ``BOOTSTRAP3`` dict variable is contains these settings and defaults:
3636
'include_jquery': False,
3737
3838
# Label class to use in horizontal forms
39-
'horizontal_label_class': 'col-md-2',
39+
'horizontal_label_class': 'col-md-3',
4040
4141
# Field class to use in horizontal forms
42-
'horizontal_field_class': 'col-md-4',
42+
'horizontal_field_class': 'col-md-9',
4343
4444
# Set HTML required attribute on required fields
4545
'set_required': True,

0 commit comments

Comments
 (0)