Documentation improvement.

I have just been bitten by this.

While it's really related to select2, due to the fact that django-select2 adds his bits of abstraction on top of select2, I wasted quite some time making sure nothing was wrong with django-select2 in the first place...

Hope it can help others, or help me if I happen to forget about it ;)
This commit is contained in:
Jonathan Liuti 2014-04-24 11:24:31 +02:00
parent e1186229eb
commit 7721d6aeb5

View file

@ -127,6 +127,12 @@ class Select2Mixin(object):
There are other such intricacies, based on which some options are removed. By enforcing this
restriction we make sure to not break the code by passing some wrong concotion of options.
.. tip:: According to the select2 documentation, in order to get the ``placeholder`` and ``allowClear``
settings working, you have to specify an empty ``<option></option>`` as the first entry in your
``<select>`` list. Otherwise the field will be rendered without a placeholder and the clear feature
will stay disabled.
:type select2_options: :py:obj:`dict` or None