-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for wagtail42 #443
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f6a8265
Initial version bumps for Wagtail 4.2 support
nickmoreton ac2650b
Use github actions to better effect
nickmoreton f09fb54
Initial remove support for < wagtail 4.1
nickmoreton ae49402
Sort imports and remove unused imports
nickmoreton cf2afc4
Silence the DEFAULT_AUTO_FIELD in testing
nickmoreton 69f7149
Update changelog
nickmoreton 2e47863
Drop use of distutils.version.LooseVersion
nickmoreton 8c6d7eb
some final formatting changes
nickmoreton 5a02cfa
UI tweeks for wagtail > 4.1
nickmoreton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,30 @@ | ||
[tox] | ||
skipsdist = True | ||
usedevelop = True | ||
|
||
envlist = | ||
py{37}-dj32-wt{41,42} | ||
py{38,39,310}-dj{32,40,41}-wt{41,42} | ||
py{311}-dj{41}-wt{41,42} | ||
|
||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
|
||
[gh-actions:env] | ||
DJANGO = | ||
3.2: dj32 | ||
4.0: dj40 | ||
4.1: dj41 | ||
|
||
WAGTAIL = | ||
2.15: wt215 | ||
2.16: wt216 | ||
3.0: wt30 | ||
4.0: wt40 | ||
|
||
[tox] | ||
skipsdist = True | ||
usedevelop = True | ||
|
||
envlist = | ||
py{37,38,39,310}-dj32-wt{215,216,30,40} | ||
py{38,39,310}-dj40-wt{216,30,40} | ||
py{38,39,310}-dj41-wt40 | ||
|
||
[testenv] | ||
description = Unit tests | ||
install_command = pip install -e ".[testing]" -U {opts} {packages} | ||
commands = coverage run --source=wagtailmenus runtests.py | ||
|
||
basepython = | ||
py37: python3.7 | ||
py38: python3.8 | ||
py39: python3.9 | ||
py310: python3.10 | ||
|
||
deps = | ||
coverage | ||
dj32: Django>=3.2,<4.0 | ||
dj40: Django>=4.0,<4.1 | ||
dj41: Django>=4.1,<4.2 | ||
wt215: wagtail>=2.15,<2.16 | ||
wt216: wagtail>=2.16,<2.17 | ||
wt30: wagtail>=3.0,<3.1 | ||
wt40: wagtail>=4.0,<4.1 | ||
wt41: wagtail>=4.1,<4.2 | ||
wt42: wagtail>=4.2,<5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import sys | ||
|
||
from cogwheels import BaseAppSettingsHelper | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
from django.urls import re_path | ||
from django.utils.safestring import mark_safe | ||
from django.utils.translation import gettext_lazy as _ | ||
from wagtail.contrib.modeladmin.options import ModelAdmin | ||
from wagtail.contrib.modeladmin.helpers import ButtonHelper | ||
from wagtail.contrib.modeladmin.options import ModelAdmin | ||
|
||
from wagtailmenus.conf import settings | ||
from wagtailmenus import views | ||
from wagtailmenus.conf import settings | ||
|
||
|
||
class MainMenuAdmin(ModelAdmin): | ||
|
@@ -17,11 +17,6 @@ class MainMenuAdmin(ModelAdmin): | |
edit_view_class = views.MainMenuEditView | ||
add_to_settings_menu = True | ||
|
||
def get_form_view_extra_css(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These styles don't seem to be needed anymore. The wagtail UI deals with them perfectly. Also removed the second instance in this file. |
||
if settings.ADD_EDITOR_OVERRIDE_STYLES: | ||
return ['wagtailmenus/css/menu-edit.css'] | ||
return [] | ||
|
||
def get_admin_urls_for_registration(self): | ||
return ( | ||
re_path(self.url_helper.get_action_url_pattern('index'), | ||
|
@@ -70,11 +65,6 @@ class FlatMenuAdmin(ModelAdmin): | |
edit_view_class = views.FlatMenuEditView | ||
add_to_settings_menu = True | ||
|
||
def get_form_view_extra_css(self): | ||
if settings.ADD_EDITOR_OVERRIDE_STYLES: | ||
return ['wagtailmenus/css/menu-edit.css'] | ||
return [] | ||
|
||
def copy_view(self, request, instance_pk): | ||
kwargs = {'model_admin': self, 'instance_pk': instance_pk} | ||
return views.FlatMenuCopyView.as_view(**kwargs)(request) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .pages import * # noqa | ||
from .menus import * # noqa | ||
from .menuitems import * # noqa | ||
from .menus import * # noqa | ||
from .pages import * # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These styles don't seem to be needed anymore. The wagtail UI deals with them perfectly.