From d3b780593eddb19b9c7e515dd1aa4456628db228 Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Mon, 25 Aug 2014 09:28:21 -0400 Subject: [PATCH] Update usage.rst --- docs/usage.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 7d61ba6..f636dfb 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -21,10 +21,12 @@ To add sorting to a model, your model needs to inherit from ``Sortable`` and hav It is also possible to order objects relative to another object that is a ForeignKey. .. note:: A small caveat here is that ``Category`` must also either inherit from ``Sortable`` or include an ``order`` property which is a ``PositiveSmallInteger`` field. This is due to the way Django admin instantiates classes. + :: - from adminsortable.fields import SortableForeignKey # models.py + from adminsortable.fields import SortableForeignKey + class Category(Sortable): class Meta(Sortable.Meta): pass