mirror of
https://github.com/jazzband/django-admin-sortable.git
synced 2026-04-05 15:31:03 +00:00
Update README.md
Added note about ordering field name.
This commit is contained in:
parent
81f2faebc6
commit
4d01ec19b5
1 changed files with 1 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ To add "sortability" to a model, you need to inherit `SortableMixin` and at mini
|
|||
- `BigIntegerField`
|
||||
|
||||
- `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.
|
||||
|
||||
Sample Model:
|
||||
|
|
|
|||
Loading…
Reference in a new issue