Skip to content

Commit

Permalink
chore: Update package dependencies and imports for wagtail_modeladmin
Browse files Browse the repository at this point in the history
  • Loading branch information
igba.ujege committed Jun 10, 2024
1 parent ca46eef commit ab7bbce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Make sure modeladmin app is installed:
```py
INSTALLED_APPS = [
...
"wagtail.contrib.modeladmin",
"wagtail_modeladmin",
...
]
```

Register the `IndexEntryAdmin` in a wagtail_hooks.py file:
```py
from wagtail.contrib.modeladmin.options import modeladmin_register
from wagtail_modeladmin.options import modeladmin_register
from streamfieldindex.modeladmin import IndexEntryAdmin

modeladmin_register(IndexEntryAdmin)
Expand Down
4 changes: 2 additions & 2 deletions streamfieldindex/modeladmin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.template.defaultfilters import truncatechars
from django.urls import reverse
from django.utils.html import format_html
from wagtail.contrib.modeladmin.helpers import PermissionHelper
from wagtail.contrib.modeladmin.options import ModelAdmin
from wagtail_modeladmin.helpers import PermissionHelper
from wagtail_modeladmin.options import ModelAdmin

from .models import IndexEntry

Expand Down
2 changes: 1 addition & 1 deletion tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"tests.testapp",
"streamfieldindex",
"wagtail.contrib.forms",
"wagtail.contrib.modeladmin",
"wagtail_modeladmin",
"wagtail.contrib.redirects",
"wagtail.embeds",
"wagtail.sites",
Expand Down
2 changes: 1 addition & 1 deletion tests/testapp/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from wagtail.contrib.modeladmin.options import modeladmin_register
from wagtail_modeladmin.options import modeladmin_register

from streamfieldindex.modeladmin import IndexEntryAdmin

Expand Down

0 comments on commit ab7bbce

Please sign in to comment.