Update README.md
parent
13c84e8d0b
commit
9935f65ca0
|
|
@ -62,7 +62,7 @@ Inlines may be drag-and-dropped into any order directly from the change form.
|
||||||
To add sorting to a model, your model needs to inherit from `Sortable` and
|
To add sorting to a model, your model needs to inherit from `Sortable` and
|
||||||
have an inner Meta class that inherits from `Sortable.Meta`
|
have an inner Meta class that inherits from `Sortable.Meta`
|
||||||
|
|
||||||
#models.py
|
# models.py
|
||||||
from adminsortable.models import Sortable
|
from adminsortable.models import Sortable
|
||||||
|
|
||||||
class MySortableClass(Sortable):
|
class MySortableClass(Sortable):
|
||||||
|
|
@ -96,7 +96,7 @@ A common use case is to have child objects that are sortable relative to a paren
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
# admin
|
# admin.py
|
||||||
from adminsortable.admin import SortableAdmin
|
from adminsortable.admin import SortableAdmin
|
||||||
|
|
||||||
from your_app.models import Category, Project
|
from your_app.models import Category, Project
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue