mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-04-22 14:04:45 +00:00
Merge pull request #176 from emorozov/master
Support proper translation of placeholders using ugettext_lazy.
This commit is contained in:
commit
1224b8d65c
1 changed files with 2 additions and 0 deletions
|
|
@ -142,6 +142,8 @@ class Select2Mixin(object):
|
|||
options = dict(self.options)
|
||||
if options.get('allowClear', None) is not None:
|
||||
options['allowClear'] = not self.is_required
|
||||
if options.get('placeholder'):
|
||||
options['placeholder'] = force_text(options['placeholder'])
|
||||
return options
|
||||
|
||||
def render_js_code(self, id_, *args):
|
||||
|
|
|
|||
Loading…
Reference in a new issue