From 72477397b022221c302ae2734541db409f243116 Mon Sep 17 00:00:00 2001 From: Tom Larsen Date: Mon, 28 Oct 2024 16:23:37 -0500 Subject: [PATCH 1/2] fix(docs) Replace `shorthand_component_formatter` with `component_shorthand_formatter` in README.md The proper name appears to be [`component_shorthand_formatter`](https://github.com/EmilStenstrom/django-components/blob/7911daa89ed61132b2a819e74769d748efb3ab03/src/django_components/tag_formatter.py#L222) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 74fd1d19..bc4c416d 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ it allows to return either a string or a Template instance. {% endcomponent %} ``` - While `django_components.shorthand_component_formatter` allows you to write components like so: + While `django_components.component_shorthand_formatter` allows you to write components like so: ```django {% button href="..." disabled %} @@ -2778,7 +2778,7 @@ Click me! You can change this behaviour in the settings under the [`COMPONENTS.tag_formatter`](#tag-formatter-setting). -For example, if you set the tag formatter to `django_components.shorthand_component_formatter`, the components will use their name as the template tags: +For example, if you set the tag formatter to `django_components.component_shorthand_formatter`, the components will use their name as the template tags: ```django {% button href="..." disabled %} @@ -2814,7 +2814,7 @@ django_components provides following predefined TagFormatters: {% component "button" href="..." / %} ``` -- **`ShorthandComponentFormatter` (`django_components.shorthand_component_formatter`)** +- **`ShorthandComponentFormatter` (`django_components.component_shorthand_formatter`)** Uses the component name as start tag, and `end` as an end tag. From aa903172a0c50a25617ac6b92e9b46a3f901c69d Mon Sep 17 00:00:00 2001 From: Juro Oravec Date: Wed, 30 Oct 2024 17:46:07 +0100 Subject: [PATCH 2/2] refactor: pin version of playwright in tests --- tox.ini | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8e80ff18..ffc3dd61 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,10 @@ deps = django50: Django>=5.0,<5.1 pytest pytest-xdist - playwright + # NOTE: Keep playwright is sync with the version in requirements-ci.txt + # Othrwise we get error: + # playwright._impl._errors.Error: BrowserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1140/chrome-linux/chrome + playwright==1.47.0 requests types-requests whitenoise @@ -48,7 +51,8 @@ commands = isort --check-only --diff src/django_components [testenv:coverage] deps = pytest-coverage - playwright + # NOTE: Keep playwright in sync with the version in requirements-ci.txt + playwright==1.47.0 requests types-requests whitenoise