jazzband / wagtailmenus

An app to help you manage and render menus in your Wagtail projects more effectively
MIT License
398 stars 138 forks source link

Wagtail 4.0 update #437

Closed katdom13 closed 1 year ago

katdom13 commented 2 years ago

This PR fixes some warnings and does the following:

Testing

Found 175 test(s).
Creating test database for alias 'default'...
System check identified some issues:

WARNINGS:
tests.LinkPage: (wagtailsearch.W001) Core Page fields missing in `search_fields`
        HINT: Ensure that LinkPage extends the Page model search fields `search_fields = Page.search_fields + [...]`
wagtailmenus.FlatMenu: (wagtailadmin.W002) FlatMenu.content_panels will have no effect on modeladmin editing
        HINT: Ensure that FlatMenu uses `panels` instead of `content_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Content tab for the content_panels to render in.
wagtailmenus.FlatMenu: (wagtailadmin.W002) FlatMenu.settings_panels will have no effect on modeladmin editing
        HINT: Ensure that FlatMenu uses `panels` instead of `settings_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Settings tab for the settings_panels to render in.
wagtailmenus.MainMenu: (wagtailadmin.W002) MainMenu.content_panels will have no effect on modeladmin editing
        HINT: Ensure that MainMenu uses `panels` instead of `content_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Content tab for the content_panels to render in.
wagtailmenus.MainMenu: (wagtailadmin.W002) MainMenu.settings_panels will have no effect on modeladmin editing
        HINT: Ensure that MainMenu uses `panels` instead of `settings_panels`or set up an `edit_handler` if you want a tabbed editing interface.
There are no default tabs on non-Page models so there will be no Settings tab for the settings_panels to render in.

System check identified 5 issues (0 silenced).
...............................................................................................................................................................................
----------------------------------------------------------------------
Ran 175 tests in 15.778s

OK
Destroying test database for alias 'default'...
Name                                                                Stmts   Miss  Cover
---------------------------------------------------------------------------------------
wagtailmenus/__init__.py                                               17      4    76%
wagtailmenus/apps.py                                                    4      0   100%
wagtailmenus/conf/__init__.py                                           0      0   100%
wagtailmenus/conf/constants.py                                          2      0   100%
wagtailmenus/conf/defaults.py                                          30      0   100%
wagtailmenus/conf/settings.py                                           5      0   100%
wagtailmenus/conf/tests/__init__.py                                     0      0   100%
wagtailmenus/conf/tests/test_modeladmin_disable_settings.py            27      0   100%
wagtailmenus/context_processors.py                                     24      0   100%
wagtailmenus/development/__init__.py                                    0      0   100%
wagtailmenus/development/urls.py                                        9      9     0%
wagtailmenus/errors.py                                                  6      0   100%
wagtailmenus/forms.py                                                  13      0   100%
wagtailmenus/management/__init__.py                                     0      0   100%
wagtailmenus/management/commands/__init__.py                            0      0   100%
wagtailmenus/management/commands/autopopulate_main_menus.py            18      2    89%
wagtailmenus/managers.py                                                4      0   100%
wagtailmenus/migrations/0001_initial.py                                 6      0   100%
wagtailmenus/migrations/0002_auto_20160129_0901.py                      5      0   100%
wagtailmenus/migrations/0003_auto_20160129_2339.py                      5      0   100%
wagtailmenus/migrations/0004_auto_20160130_0024.py                      5      0   100%
wagtailmenus/migrations/0005_auto_20160130_2209.py                      5      0   100%
wagtailmenus/migrations/0006_auto_20160131_1347.py                      5      0   100%
wagtailmenus/migrations/0007_auto_20160131_2000.py                      5      0   100%
wagtailmenus/migrations/0008_auto_20160131_2327.py                      5      0   100%
wagtailmenus/migrations/0009_auto_20160201_0859.py                      5      0   100%
wagtailmenus/migrations/0010_auto_20160201_1558.py                      5      0   100%
wagtailmenus/migrations/0011_auto_20160415_1519.py                      5      0   100%
wagtailmenus/migrations/0012_auto_20160419_0039.py                      6      0   100%
wagtailmenus/migrations/0013_auto_20160423_1124.py                      5      0   100%
wagtailmenus/migrations/0014_auto_20160423_1339.py                      5      0   100%
wagtailmenus/migrations/0015_auto_20160423_1348.py                      5      0   100%
wagtailmenus/migrations/0016_auto_20160930_0645.py                      5      0   100%
wagtailmenus/migrations/0017_auto_20161013_1658.py                      6      0   100%
wagtailmenus/migrations/0018_auto_20161204_2043.py                      5      0   100%
wagtailmenus/migrations/0019_auto_20161204_2143.py                      5      0   100%
wagtailmenus/migrations/0020_auto_20161210_0004.py                      6      0   100%
wagtailmenus/migrations/0021_auto_20170106_2352.py                      5      0   100%
wagtailmenus/migrations/0022_auto_20170913_2125.py                      5      0   100%
wagtailmenus/migrations/0023_remove_use_specific.py                     4      0   100%
wagtailmenus/migrations/__init__.py                                     0      0   100%
wagtailmenus/modeladmin.py                                             70      1    99%
wagtailmenus/models/__init__.py                                         3      0   100%
wagtailmenus/models/menuitems.py                                       85      7    92%
wagtailmenus/models/menus.py                                          549     15    97%
wagtailmenus/models/mixins.py                                          42      0   100%
wagtailmenus/models/pages.py                                          124      7    94%
wagtailmenus/panels.py                                                 31      2    94%
wagtailmenus/settings/__init__.py                                       0      0   100%
wagtailmenus/settings/base.py                                          22      0   100%
wagtailmenus/settings/development.py                                    9      9     0%
wagtailmenus/settings/testing.py                                       11      0   100%
wagtailmenus/templatetags/__init__.py                                   0      0   100%
wagtailmenus/templatetags/menu_tags.py                                 61      2    97%
wagtailmenus/tests/__init__.py                                          0      0   100%
wagtailmenus/tests/base.py                                             70      2    97%
wagtailmenus/tests/migrations/0001_initial.py                           7      0   100%
wagtailmenus/tests/migrations/0002_homepage.py                          6      0   100%
wagtailmenus/tests/migrations/0003_auto_20160418_1204.py                5      0   100%
wagtailmenus/tests/migrations/0004_auto_20160419_2022.py                5      0   100%
wagtailmenus/tests/migrations/0005_auto_20160419_2025.py                5      0   100%
wagtailmenus/tests/migrations/0006_auto_20160423_1339.py                5      0   100%
wagtailmenus/tests/migrations/0007_auto_20160423_1348.py                5      0   100%
wagtailmenus/tests/migrations/0008_contactpage.py                       6      0   100%
wagtailmenus/tests/migrations/0009_typicalpage.py                       6      0   100%
wagtailmenus/tests/migrations/0010_auto_20161211_2116.py                9      0   100%
wagtailmenus/tests/migrations/0011_auto_20170106_2355.py                5      0   100%
wagtailmenus/tests/migrations/0012_linkpage.py                          6      0   100%
wagtailmenus/tests/migrations/0013_auto_20170630_1002.py                5      0   100%
wagtailmenus/tests/migrations/0014_noabsoluteurlspage.py                6      0   100%
wagtailmenus/tests/migrations/0015_remove_use_specific.py               4      0   100%
wagtailmenus/tests/migrations/0016_articlelistpage_articlepage.py       6      0   100%
wagtailmenus/tests/migrations/__init__.py                               0      0   100%
wagtailmenus/tests/modeladmin.py                                        5      5     0%
wagtailmenus/tests/models/__init__.py                                   2      0   100%
wagtailmenus/tests/models/menus.py                                     38      2    95%
wagtailmenus/tests/models/pages.py                                    111      5    95%
wagtailmenus/tests/models/utils.py                                     13      0   100%
wagtailmenus/tests/test_backend.py                                    150      3    98%
wagtailmenus/tests/test_base_menu_classes.py                           44      2    95%
wagtailmenus/tests/test_childrenmenu_class.py                          11      0   100%
wagtailmenus/tests/test_commands.py                                    35      2    94%
wagtailmenus/tests/test_custom_models.py                              107      0   100%
wagtailmenus/tests/test_flatmenu_class.py                              46      0   100%
wagtailmenus/tests/test_hooks.py                                       61      4    93%
wagtailmenus/tests/test_mainmenu_class.py                              87      1    99%
wagtailmenus/tests/test_menu_class.py                                  48      0   100%
wagtailmenus/tests/test_menu_items.py                                  83      2    98%
wagtailmenus/tests/test_menu_rendering.py                             252      2    99%
wagtailmenus/tests/test_page_models.py                                 69      2    97%
wagtailmenus/tests/test_sectionmenu_class.py                           16      0   100%
wagtailmenus/tests/test_test_page_models.py                            27      0   100%
wagtailmenus/tests/urls.py                                              6      0   100%
wagtailmenus/tests/utils.py                                            26      4    85%
wagtailmenus/utils/__init__.py                                          0      0   100%
wagtailmenus/utils/deprecation.py                                       5      5     0%
wagtailmenus/utils/inspection.py                                        9      9     0%
wagtailmenus/utils/misc.py                                             74      5    93%
wagtailmenus/utils/tests/__init__.py                                    0      0   100%
wagtailmenus/utils/tests/test_misc.py                                 114      3    97%
wagtailmenus/utils/version.py                                          13      2    85%
wagtailmenus/views.py                                                 121      4    97%
wagtailmenus/wagtail_hooks.py                                          15      2    87%
---------------------------------------------------------------------------------------
TOTAL                                                                3033    124    96%
nickmoreton commented 1 year ago

@katdom13 I have included some items from this PR in https://github.com/jazzband/wagtailmenus/pull/443 please let me know if you see something I missed. Thanks

schlich commented 1 year ago

@nickmoreton @katdom13 is this issue ok to close? any of these changes still applicable?

nickmoreton commented 1 year ago

@nickmoreton @katdom13 is this issue ok to close? any of these changes still applicable?

@schlich It looks like some of the docs updates here could do with updating, mostly around the import paths. I will have a look at it asap. I think a new PR might be good, at least for a docs update.

MrCordeiro commented 1 year ago

He @nickmoreton, given your latest comment I'll be closing this PR. I look forward to seeing a new version with the docs update.

Thank you for your effort! 😉