Update README.md

Added note about ordering field name.
master
Brandon Taylor 2016-12-01 21:52:11 -05:00 committed by GitHub
parent 81f2faebc6
commit 4d01ec19b5
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ To add "sortability" to a model, you need to inherit `SortableMixin` and at mini
- `BigIntegerField` - `BigIntegerField`
- `Meta.ordering` **must only contain one value**, otherwise, your objects will not be sorted correctly. - `Meta.ordering` **must only contain one value**, otherwise, your objects will not be sorted correctly.
- **IMPORTANT**: You must name the field you use for ordering something other than "order_field" as this name is reserved by the `SortableMixin` class.
- It is recommended that you set `editable=False` and `db_index=True` on the field defined in `Meta.ordering` for a seamless Django admin experience and faster lookups on the objects. - It is recommended that you set `editable=False` and `db_index=True` on the field defined in `Meta.ordering` for a seamless Django admin experience and faster lookups on the objects.
Sample Model: Sample Model: