Skip to content
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

Wagtail 2.15 Support #51

Merged
merged 8 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
strategy:
matrix:
toxenv:
- py36-dj22-wag27
- py36-dj22-waglatest
- py39-dj22-waglatest
- py36-dj32-wag215
- py36-dj32-waglatest
- py39-dj32-wag215
- py39-dj32-waglatest
include:
- toxenv: py36-dj22-wag27
- toxenv: py36-dj32-wag215
python-version: 3.6
- toxenv: py36-dj22-waglatest
- toxenv: py36-dj32-waglatest
python-version: 3.6
- toxenv: py39-dj22-waglatest
- toxenv: py39-dj32-wag215
python-version: 3.9
- toxenv: py39-dj32-waglatest
python-version: 3.9
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Install the package using pip:
.. code-block:: bash

$ pip install wagtail-inventory

Add ``wagtailinventory`` as an installed app in your Django settings:

.. code-block:: python
Expand Down Expand Up @@ -52,8 +52,8 @@ Compatibility
This code has been tested for compatibility with:

* Python 3.6+
* Django 2.2 (LTS), 3.1 (current)
* Wagtail 2.7 (LTS), 2.10 (current)
* Django 3.2 (LTS)
* Wagtail 2.15 (LTS), 2.16 (current)

It should be compatible with all intermediate versions, as well.
If you find that it is not, please `file an issue <https://github.com/cfpb/wagtail-inventory/issues/new>`_.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

install_requires = [
"tqdm==4.15.0",
"wagtail>=2.7,<3",
"wagtail>=2.15,<3",
]


Expand All @@ -25,7 +25,7 @@
description="Lookup Wagtail pages by block content",
long_description=open("README.rst", "r", encoding="utf-8").read(),
license="CCO",
version="1.3",
version="1.4",
version_format="{tag}.dev{commitcount}+{gitsha}",
include_package_data=True,
packages=find_packages(),
Expand Down
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
skipsdist=True
envlist=
lint,
py{36}-dj22-wag{27,latest}
py{39}-dj{22,32}-wag{latest}
py{36}-dj32-wag{215,latest}
py{39}-dj32-wag{215,latest}

[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
Expand All @@ -20,10 +20,9 @@ basepython=

deps=
mock>=1.0.0
dj22: Django>=2.2,<2.3
dj32: Django>=3.2,<3.3
wag27: wagtail>=2.7,<2.8
waglatest: wagtail>=2.10,<3
wag215: wagtail>=2.15,<2.16
waglatest: wagtail>=2.15,<3

[testenv:lint]
basepython=python3.9
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends 'wagtailadmin/pages/listing/_list_explore.html' %}

{% block page_navigation %}
{% endblock %}
12 changes: 11 additions & 1 deletion wagtailinventory/templates/wagtailinventory/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
</style>
{% endblock %}

{% block extra_js %}
{{ block.super }}
<script>
window.wagtailConfig.BULK_ACTION_ITEM_TYPE = 'PAGE';
</script>
<script defer src="{% versioned_static 'wagtailadmin/js/bulk-actions.js' %}"></script>
{% endblock %}

{% block content %}
{% trans "Block Inventory" as header_str %}
{% include "wagtailadmin/shared/header.html" with title=header_str icon="placeholder" %}
Expand All @@ -54,8 +62,10 @@ <h2>
{% endblocktrans %}
</h2>

{% include "wagtailadmin/pages/listing/_list_explore.html" with show_parent=1 allow_navigation=0 %}
{% include "wagtailinventory/_list_explore_inventory.html" with show_parent=1 show_bulk_actions=1 %}
{% include "wagtailadmin/shared/pagination_nav.html" with items=pages %}
{% trans "Select all pages in listing" as select_all_text %}
{% include 'wagtailadmin/bulk_actions/footer.html' with select_all_obj_text=select_all_text app_label='wagtailcore' model_name='page' objects=pages %}
</div>
{% else %}
<div class="nice-padding">
Expand Down