Skip to content

Commit

Permalink
Add wagtail_modeladmin
Browse files Browse the repository at this point in the history
  • Loading branch information
katdom13 committed Nov 16, 2023
1 parent 17183c1 commit 057975f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dependencies = [
testing = [
"coverage~=6.4.4",
"tox~=3.26.0",
"wagtail-modeladmin~=1.0.0",
]

[project.urls]
Expand Down
4 changes: 3 additions & 1 deletion tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import os

from wagtail import VERSION as WAGTAIL_VERSION

PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR)

Expand Down Expand Up @@ -38,7 +40,7 @@
"wagtail.search",
"wagtail.admin",
"wagtail.api.v2",
"wagtail.contrib.modeladmin",
"wagtail_modeladmin" if WAGTAIL_VERSION >= (5, 1) else "wagtail.contrib.modeladmin",
"wagtail.contrib.routable_page",
"wagtail.contrib.styleguide",
"wagtail.sites",
Expand Down
7 changes: 6 additions & 1 deletion tests/testapp/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from wagtail import VERSION as WAGTAIL_VERSION

if WAGTAIL_VERSION >= (5, 1):
from wagtail_modeladmin.options import ModelAdmin, modeladmin_register
else:
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register

from wagtail_rangefilter.filters import DateRangeFilter, DateTimeRangeFilter

Expand Down

0 comments on commit 057975f

Please sign in to comment.