Skip to content

Commit 7df3c89

Browse files
authored
usage.rst: improve source example in "Setup Tabular Inlines ..."
1 parent c1c71b4 commit 7df3c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,15 @@ Setup the Tabular Inlines to enable Buttons to be sorted in Django Admin
252252
.. code:: python
253253
254254
from django.contrib import admin
255-
from adminsortable2.admin import SortableInlineAdminMixin
255+
from adminsortable2.admin import SortableInlineAdminMixin, SortableAdminBase
256256
from models import Panel
257257
258258
class ButtonTabularInline(SortableInlineAdminMixin, admin.TabularInline):
259259
# We don't use the Button model but rather the juction model specified on Panel.
260260
model = Panel.buttons.through
261261
262262
@admin.register(Panel)
263-
class PanelAdmin(admin.ModelAdmin)
263+
class PanelAdmin(SortableAdminBase, admin.ModelAdmin):
264264
inlines = (ButtonTabularInline,)
265265
266266

0 commit comments

Comments
 (0)