mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
Recommend the component_[css/js}_dependencies tags.
This commit is contained in:
parent
3c1ef43198
commit
b30506087c
1 changed files with 3 additions and 2 deletions
|
@ -169,7 +169,7 @@ And voilá!! We've created our first component.
|
||||||
|
|
||||||
# Use the component in a template
|
# 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
|
```htmldjango
|
||||||
{% load component_tags %}
|
{% load component_tags %}
|
||||||
|
@ -177,10 +177,11 @@ First load the `component_tags` tag library, then use the `component_dependencie
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>My example calendar</title>
|
<title>My example calendar</title>
|
||||||
{% component_dependencies %}
|
{% component_css_dependencies %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% component "calendar" date="2015-06-19" %}
|
{% component "calendar" date="2015-06-19" %}
|
||||||
|
{% component_js_dependencies %}
|
||||||
</body>
|
</body>
|
||||||
<html>
|
<html>
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue