mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Add doc note about setting db_index on StatusField; thanks Matt McClanahan for pointing this out.
This commit is contained in:
parent
e8552a01f1
commit
6f5c57833c
1 changed files with 6 additions and 0 deletions
|
|
@ -95,6 +95,12 @@ default value to the first item in the ``STATUS`` choices::
|
|||
(The ``STATUS`` class attribute does not have to be a `Choices`_
|
||||
instance, it can be an ordinary list of two-tuples).
|
||||
|
||||
``StatusField`` does not set ``db_index=True`` automatically; if you
|
||||
expect to frequently filter on your status field (and it will have
|
||||
enough selectivity to make an index worthwhile) you may want to add this
|
||||
yourself.
|
||||
|
||||
|
||||
MonitorField
|
||||
============
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue