Recommend the component_[css/js}_dependencies tags.

This commit is contained in:
Emil Stenström 2021-03-06 10:23:31 +01:00
parent 3c1ef43198
commit b30506087c

View file

@ -169,7 +169,7 @@ And voilá!! We've created our first component.
# Use the component in a template
First load the `component_tags` tag library, then use the `component_dependencies` and `component` tags to render the component to the page.
First load the `component_tags` tag library, then use the `component_[js/css]_dependencies` and `component` tags to render the component to the page.
```htmldjango
{% load component_tags %}
@ -177,10 +177,11 @@ First load the `component_tags` tag library, then use the `component_dependencie
<html>
<head>
<title>My example calendar</title>
{% component_dependencies %}
{% component_css_dependencies %}
</head>
<body>
{% component "calendar" date="2015-06-19" %}
{% component_js_dependencies %}
</body>
<html>
```