Source

django-selectable / docs / settings.rst

Settings

SELECTABLE_MAX_LIMIT

This setting is used to limit the number of results returned by the auto-complete fields. Each field/widget can individually lower this maximum. The result sets will be paginated allowing the client to ask for more results. The limit is passed as a query parameter and validated against this value to ensure the client cannot manipulate the query string to retrive more values.

You may disable this global maximum by setting

SELECTABLE_MAX_LIMIT = None

Default: 25

Javascript Plugin Options

Below the options for configuring the Javascript behavior of the django-selectable widgets.

removeIcon

This is the class name used for the remove buttons for the multiple select widgets. The set of icon classes built into the jQuery UI framework can be found here: http://jqueryui.com/themeroller/

Default: ui-icon-close

comboboxIcon

This is the class name used for the combobox dropdown icon. The set of icon classes built into the jQuery UI framework can be found here: http://jqueryui.com/themeroller/

Default: ui-icon-triangle-1-s

prepareQuery

prepareQuery is a function that is run prior to sending the search request to the server. It is an oppotunity to add additional parameters to the search query. It takes one argument which is the current search parameters as a dictionary. For more information on its usage see :ref:`Adding Parameters on the Client Side <client-side-parameters>`.

Default: null

highlightMatch

If true the portions of the label which match the current search term will be wrapped in a span with the class highlight.

Default: true

formatLabel

formatLabel is a function that is run prior to rendering the search results in the dropdown menu. It takes two arguments: the current item label and the item data dictionary. It should return the label which should be used. For more information on its usage see :ref:`Label Formats on the Client Side <advanaced-label-formats>`.

Default: null