Skip to content

Commit

Permalink
Merge 5399432 into 570bcff
Browse files Browse the repository at this point in the history
  • Loading branch information
willbarton authored Aug 26, 2020
2 parents 570bcff + 5399432 commit 1f427eb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 17 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,21 @@ jobs:
strategy:
matrix:
toxenv:
- py36-dj22-wag23
- py36-dj22-wag27
- py36-dj22-wag210
- py36-dj31-wag210
- py38-dj22-wag27
- py38-dj22-wag210
- py38-dj31-wag210
include:
- toxenv: py36-dj22-wag23
- toxenv: py36-dj22-wag27
python-version: 3.6
- toxenv: py36-dj22-wag210
python-version: 3.6
- toxenv: py36-dj31-wag210
python-version: 3.6
- toxenv: py38-dj22-wag27
python-version: 3.8
- toxenv: py38-dj22-wag210
python-version: 3.8
- toxenv: py38-dj31-wag210
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Wagtail-Flags adds a Wagtail admin UI and Wagtail Site-based condition on top of
## Dependencies

- Python 3.6+
- Django 2.2, 3.1
- Django-Flags 4.2+
- Wagtail 2.3, 2.9, 2.10
- Django 2.2 (LTS), 3.1 (current)
- Django-Flags 4.2
- Wagtail 2.7 (LTS), 2.10 (current)

It should be compatible at all intermediate versions, as well.
If you find that it is not, please [file an issue](https://github.com/cfpb/wagtail-flags/issues/new).
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages, setup

install_requires = [
"wagtail>=2.3,<2.11",
"wagtail>=2.7,<2.11",
"django-flags>=4.2,<5.1",
]

Expand All @@ -16,7 +16,7 @@
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
license="CC0",
version="4.2.3",
version="5.0.0",
include_package_data=True,
packages=find_packages(),
python_requires=">=3.6",
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
skipsdist=True
envlist=
lint,
py{36}-dj{22}-wag{23,29},
py{36,38}-dj{22,31}-wag{210}
py{36,38}-dj{22,31}-wag{27,210}

[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
Expand All @@ -21,8 +20,7 @@ basepython=
deps=
dj22: Django>=2.2,<2.3
dj31: Django>=3.1,<3.2
wag23: wagtail>=2.3,<2.4
wag29: wagtail>=2.9,<2.10
wag27: wagtail>=2.7,<2.8
wag210: wagtail>=2.10,<2.11

[testenv:lint]
Expand Down
4 changes: 2 additions & 2 deletions wagtailflags/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

@register("site")
def site_condition(site_str, request=None, **kwargs):
""" Does the requests's Wagtail Site match the given site?
site_str should be 'hostname:port', or 'hostname [default]'. """
"""Does the requests's Wagtail Site match the given site?
site_str should be 'hostname:port', or 'hostname [default]'."""
if request is None:
raise RequiredForCondition(
"request is required for condition " "'site'"
Expand Down
5 changes: 4 additions & 1 deletion wagtailflags/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class Meta:

class FlagStateForm(DjangoFlagsFlagStateForm):
name = forms.CharField(
label="Flag", required=True, disabled=True, widget=forms.HiddenInput(),
label="Flag",
required=True,
disabled=True,
widget=forms.HiddenInput(),
)

class Meta:
Expand Down
5 changes: 4 additions & 1 deletion wagtailflags/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
"taggit",
)
+ WAGTAIL_APPS
+ ("flags", "wagtailflags",)
+ (
"flags",
"wagtailflags",
)
)

STATIC_ROOT = "/tmp/static/"
Expand Down
4 changes: 2 additions & 2 deletions wagtailflags/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def index(request):


def create_flag(request):
""" Create a new flag.
"""Create a new flag.
This will add a FlagState object with a custom name and a boolean: False
condition """
condition"""
if request.method == "POST":
form = NewFlagForm(
request.POST,
Expand Down

0 comments on commit 1f427eb

Please sign in to comment.