From 88bdb3816ff1b3ddd229b7db49b1a970385fb43a Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Mon, 25 Aug 2014 09:27:34 -0400 Subject: [PATCH] Update usage.rst --- docs/usage.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index c78fc97..7d61ba6 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -4,8 +4,8 @@ Using Django Admin Sortable Models ------ -To add sorting to a model, your model needs to inherit from ``Sortable`` and have an inner ``Meta`` class that inherits from ``Sortable.Meta`` -:: +To add sorting to a model, your model needs to inherit from ``Sortable`` and have an inner ``Meta`` class that inherits from ``Sortable.Meta``:: + # models.py from adminsortable.models import Sortable @@ -21,8 +21,8 @@ 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 +:: + from adminsortable.fields import SortableForeignKey # models.py class Category(Sortable):