mirror of
https://github.com/django-components/django-components.git
synced 2025-08-23 23:44:06 +00:00
Merge pull request #726 from larsent/patch-1
fix(docs) Replace `shorthand_component_formatter` with `component_sho…
This commit is contained in:
commit
de09adcad8
1 changed files with 3 additions and 3 deletions
|
@ -141,7 +141,7 @@ it allows to return either a string or a Template instance.
|
||||||
{% endcomponent %}
|
{% 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
|
```django
|
||||||
{% button href="..." disabled %}
|
{% 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).
|
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
|
```django
|
||||||
{% button href="..." disabled %}
|
{% button href="..." disabled %}
|
||||||
|
@ -2814,7 +2814,7 @@ django_components provides following predefined TagFormatters:
|
||||||
{% component "button" href="..." / %}
|
{% 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>`
|
Uses the component name as start tag, and `end<component_name>`
|
||||||
as an end tag.
|
as an end tag.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue