Skip to content

Commit

Permalink
allow importing of Wagtail modeladmin from contrib or external
Browse files Browse the repository at this point in the history
Wagtail 6.0 removed the deprecated wagtail.contrib.modeladmin app. It is available as an external package https://github.com/wagtail-nest/wagtail-modeladmin
  • Loading branch information
kraig-droid authored Nov 13, 2024
1 parent 75c37bb commit b2cc103
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions wagtailsvg/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from wagtail.contrib.modeladmin.options import (
ModelAdmin,
modeladmin_register
)
try:
from wagtail.contrib.modeladmin.options import (
ModelAdmin,
modeladmin_register
)
except ImportError:
from wagtail_modeladmin.options import (
ModelAdmin,
modeladmin_register
)

try:
from wagtail import hooks
Expand Down

0 comments on commit b2cc103

Please sign in to comment.