mirror of
https://github.com/django-components/django-components.git
synced 2025-09-27 16:09:07 +00:00
Deployed 96f48bc
to dev with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
e48eaee5cf
commit
d1d617b7ad
3 changed files with 24 additions and 24 deletions
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1066 target=_blank>See source code</a></p> <p>Marks location where CSS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted into the <code><head></code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_css_dependencies %}</code> tags, CSS links are by default inserted into the <code><head></code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#js-and-css-output-locations>JS and CSS output locations</a>)</p> <p>Note that there should be only one <code>{% component_css_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL CSS links will be duplicately inserted into ALL these places.</p> <h2 id=component_js_dependencies>component_js_dependencies<a class=headerlink href=#component_js_dependencies title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a><span class=cp>{%</span> <span class=k>component_js_dependencies</span> <span class=cp>%}</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1088 target=_blank>See source code</a></p> <p>Marks location where JS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted at the end of the <code><body></code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_js_dependencies %}</code> tags, JS scripts are by default inserted at the end of the <code><body></code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#js-and-css-output-locations>JS and CSS output locations</a>)</p> <p>Note that there should be only one <code>{% component_js_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL JS scripts will be duplicately inserted into ALL these places.</p> <h2 id=component>component<a class=headerlink href=#component title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-3-1 name=__codelineno-3-1 href=#__codelineno-3-1></a><span class=cp>{%</span> <span class=k>component</span> <span class=o>*</span><span class=nv>args</span><span class=o>:</span> <span class=nv>Any</span><span class=o>,</span> <span class=o>**</span><span class=nv>kwargs</span><span class=o>:</span> <span class=nv>Any</span> <span class=o>[</span><span class=nv>only</span><span class=o>]</span> <span class=cp>%}</span>
|
||||
<a id=__codelineno-3-2 name=__codelineno-3-2 href=#__codelineno-3-2></a><span class=cp>{%</span> <span class=k>endcomponent</span> <span class=cp>%}</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1420 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p><strong>Args:</strong></p> <ul> <li><code>name</code> (str, required): Registered name of the component to render</li> <li>All other args and kwargs are defined based on the component itself.</li> </ul> <p>If you defined a component <code>"my_table"</code></p> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=kn>from</span><span class=w> </span><span class=nn>django_component</span><span class=w> </span><span class=kn>import</span> <span class=n>Component</span><span class=p>,</span> <span class=n>register</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1432 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p><strong>Args:</strong></p> <ul> <li><code>name</code> (str, required): Registered name of the component to render</li> <li>All other args and kwargs are defined based on the component itself.</li> </ul> <p>If you defined a component <code>"my_table"</code></p> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=kn>from</span><span class=w> </span><span class=nn>django_component</span><span class=w> </span><span class=kn>import</span> <span class=n>Component</span><span class=p>,</span> <span class=n>register</span>
|
||||
<a id=__codelineno-4-2 name=__codelineno-4-2 href=#__codelineno-4-2></a>
|
||||
<a id=__codelineno-4-3 name=__codelineno-4-3 href=#__codelineno-4-3></a><span class=nd>@register</span><span class=p>(</span><span class=s2>"my_table"</span><span class=p>)</span>
|
||||
<a id=__codelineno-4-4 name=__codelineno-4-4 href=#__codelineno-4-4></a><span class=k>class</span><span class=w> </span><span class=nc>MyTable</span><span class=p>(</span><span class=n>Component</span><span class=p>):</span>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"version": "dev",
|
||||
"title": "dev (5880538)",
|
||||
"title": "dev (96f48bc)",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue