mirror of
https://github.com/django-components/django-components.git
synced 2025-10-03 10:44:34 +00:00
Merge branch 'master' into dependabot/pip/charset-normalizer-3.4.0
This commit is contained in:
commit
a8456e4a5d
2 changed files with 9 additions and 5 deletions
|
@ -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<component_name>`
|
||||
as an end tag.
|
||||
|
|
8
tox.ini
8
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue