www/py-django-bleach: Allow build with py-bleach 6.0.0+

- Bump PORTREVISION for package change
This commit is contained in:
Po-Chuan Hsieh 2023-02-05 23:19:51 +08:00
parent 911fe90f47
commit 0a928f3881
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
2 changed files with 26 additions and 1 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= django-bleach
PORTVERSION= 3.0.1
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -11,7 +12,7 @@ WWW= https://github.com/marksweb/django-bleach
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bleach>=5<6:www/py-bleach@${PY_FLAVOR} \
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bleach>=5:www/py-bleach@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}django32>=3.2:www/py-django32@${PY_FLAVOR}
USES= python:3.8+

View file

@ -0,0 +1,24 @@
--- django_bleach/tests/test_forms.py.orig 2022-10-12 00:33:48 UTC
+++ django_bleach/tests/test_forms.py
@@ -147,7 +147,7 @@ class TestCustomWidget(TestCase):
no_tags = BleachField(
max_length=100,
strip_tags=True,
- allowed_tags=[]
+ allowed_tags={}
)
no_strip = BleachField(
max_length=100,
--- testproject/models.py.orig 2022-10-12 00:33:48 UTC
+++ testproject/models.py
@@ -10,8 +10,8 @@ class Person(models.Model):
biography = BleachField(
max_length=100,
verbose_name='Person biography',
- allowed_tags=['p', 'a', 'li', 'ul', 'strong'],
+ allowed_tags={'p', 'a', 'li', 'ul', 'strong'},
allowed_attributes=['class', 'href', 'style'],
- allowed_protocols=['http', 'https'],
+ allowed_protocols={'http', 'https'},
css_sanitizer=CSSSanitizer(allowed_css_properties=['color', 'background-color'])
)