Skip to content

Commit

Permalink
Merge 0c7efb6 into 7b58e7c
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonel Ceruto González committed May 21, 2014
2 parents 7b58e7c + 0c7efb6 commit 588a6b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bootstrap3/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def __init__(self, field, layout='', form_group_class=FORM_GROUP_CLASS,
field_class=None, label_class=None, show_label=True,
show_help=True, exclude='', set_required=True,
addon_before=None, addon_after=None,
error_css_class='', required_css_class=''):
error_css_class='', required_css_class='',
placeholder=None):
# Only allow BoundField
if not isinstance(field, BoundField):
raise BootstrapError('Parameter "field" should contain a valid Django BoundField.')
Expand All @@ -162,7 +163,7 @@ def __init__(self, field, layout='', form_group_class=FORM_GROUP_CLASS,
self.initial_attrs = self.widget.attrs.copy()
self.field_help = text_value(mark_safe(field.help_text)) if show_help and field.help_text else ''
self.field_errors = [conditional_escape(text_value(error)) for error in field.errors]
self.placeholder = field.label
self.placeholder = placeholder or field.label
self.addon_before = addon_before
self.addon_after = addon_after

Expand Down

0 comments on commit 588a6b4

Please sign in to comment.