Deployed f80457e to dev with MkDocs 1.6.1 and mike 2.1.3

This commit is contained in:
github-actions 2025-05-13 21:19:59 +00:00
parent c835323b27
commit c54849b80c
4 changed files with 5 additions and 5 deletions

View file

@ -2084,7 +2084,7 @@
<a id=__codelineno-0-14 name=__codelineno-0-14 href=#__codelineno-0-14></a> <span class=n>engine</span><span class=o>=...</span>
<a id=__codelineno-0-15 name=__codelineno-0-15 href=#__codelineno-0-15></a><span class=p>)</span>
</code></pre></div> </div> </div> <div class="doc doc-object doc-function"> <h2 id=django_components.format_attributes class="doc doc-heading"> <code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">format_attributes</span> <a href=#django_components.format_attributes class=headerlink title="Permanent link">¤</a></h2> <div class="doc-signature highlight"><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=nf>format_attributes</span><span class=p>(</span><span class=n>attributes</span><span class=p>:</span> <span class=n><a class="autorefs autorefs-external" title=typing.Mapping href=https://docs.python.org/3.12/library/typing.html#typing.Mapping>Mapping</a></span><span class=p>[</span><span class=n><a class="autorefs autorefs-external" href=https://docs.python.org/3.12/library/stdtypes.html#str>str</a></span><span class=p>,</span> <span class=n><a class="autorefs autorefs-external" title=typing.Any href=https://docs.python.org/3.12/library/typing.html#typing.Any>Any</a></span><span class=p>])</span> <span class=o>-&gt;</span> <span class=n><a class="autorefs autorefs-external" href=https://docs.python.org/3.12/library/stdtypes.html#str>str</a></span>
</code></pre></div> <div class="doc doc-contents first"> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/attributes.py#L93 target=_blank>See source code</a></p> <p>Format a dict of attributes into an HTML attributes string.</p> <p>Read more about <a href=../../concepts/fundamentals/html_attributes>HTML attributes</a>.</p> <p><strong>Example:</strong></p> <div class=highlight><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=n>format_attributes</span><span class=p>({</span><span class=s2>&quot;class&quot;</span><span class=p>:</span> <span class=s2>&quot;my-class&quot;</span><span class=p>,</span> <span class=s2>&quot;data-id&quot;</span><span class=p>:</span> <span class=s2>&quot;123&quot;</span><span class=p>})</span>
</code></pre></div> <div class="doc doc-contents first"> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/attributes.py#L92 target=_blank>See source code</a></p> <p>Format a dict of attributes into an HTML attributes string.</p> <p>Read more about <a href=../../concepts/fundamentals/html_attributes>HTML attributes</a>.</p> <p><strong>Example:</strong></p> <div class=highlight><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=n>format_attributes</span><span class=p>({</span><span class=s2>&quot;class&quot;</span><span class=p>:</span> <span class=s2>&quot;my-class&quot;</span><span class=p>,</span> <span class=s2>&quot;data-id&quot;</span><span class=p>:</span> <span class=s2>&quot;123&quot;</span><span class=p>})</span>
</code></pre></div> <p>will return</p> <div class=highlight><pre><span></span><code><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a><span class=s1>&#39;class=&quot;my-class&quot; data-id=&quot;123&quot;&#39;</span>
</code></pre></div> </div> </div> <div class="doc doc-object doc-function"> <h2 id=django_components.get_component_by_class_id class="doc doc-heading"> <code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_component_by_class_id</span> <a href=#django_components.get_component_by_class_id class=headerlink title="Permanent link">¤</a></h2> <div class="doc-signature highlight"><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=nf>get_component_by_class_id</span><span class=p>(</span><span class=n>comp_cls_id</span><span class=p>:</span> <span class=n><a class="autorefs autorefs-external" href=https://docs.python.org/3.12/library/stdtypes.html#str>str</a></span><span class=p>)</span> <span class=o>-&gt;</span> <span class=n><a class="autorefs autorefs-external" title=typing.Type href=https://docs.python.org/3.12/library/typing.html#typing.Type>Type</a></span><span class=p>[</span><span class=n><a class="autorefs autorefs-internal" title=" Component (django_components.component.Component)" href=#django_components.Component>Component</a></span><span class=p>]</span>
</code></pre></div> <div class="doc doc-contents first"> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/component.py#L149 target=_blank>See source code</a></p> <p>Get a component class by its unique ID.</p> <p>Each component class is associated with a unique hash that's derived from its module import path.</p> <p>E.g. <code>path.to.my.secret.MyComponent</code> -&gt; <code>MyComponent_ab01f32</code></p> <p>This hash is available under <a href=../api#django_components.Component.class_id><code>class_id</code></a> on the component class.</p> <p>Raises <code>KeyError</code> if the component class is not found.</p> <p>NOTE: This is mainly intended for extensions.</p> </div> </div> <div class="doc doc-object doc-function"> <h2 id=django_components.get_component_dirs class="doc doc-heading"> <code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_component_dirs</span> <a href=#django_components.get_component_dirs class=headerlink title="Permanent link">¤</a></h2> <div class="doc-signature highlight"><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=nf>get_component_dirs</span><span class=p>(</span><span class=n>include_apps</span><span class=p>:</span> <span class=n><a class="autorefs autorefs-external" href=https://docs.python.org/3.12/library/functions.html#bool>bool</a></span> <span class=o>=</span> <span class=kc>True</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=n><a class="autorefs autorefs-external" title=typing.List href=https://docs.python.org/3.12/library/typing.html#typing.List>List</a></span><span class=p>[</span><span class=n><a class="autorefs autorefs-external" title=pathlib.Path href=https://docs.python.org/3.12/library/pathlib.html#pathlib.Path>Path</a></span><span class=p>]</span>
@ -2116,7 +2116,7 @@
<a id=__codelineno-1-2 name=__codelineno-1-2 href=#__codelineno-1-2></a>
<a id=__codelineno-1-3 name=__codelineno-1-3 href=#__codelineno-1-3></a><span class=n>import_libraries</span><span class=p>(</span><span class=k>lambda</span> <span class=n>path</span><span class=p>:</span> <span class=n>path</span><span class=o>.</span><span class=n>replace</span><span class=p>(</span><span class=s2>&quot;tests.&quot;</span><span class=p>,</span> <span class=s2>&quot;myapp.&quot;</span><span class=p>))</span>
</code></pre></div></p> </div> </div> <div class="doc doc-object doc-function"> <h2 id=django_components.merge_attributes class="doc doc-heading"> <code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">merge_attributes</span> <a href=#django_components.merge_attributes class=headerlink title="Permanent link">¤</a></h2> <div class="doc-signature highlight"><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=nf>merge_attributes</span><span class=p>(</span><span class=o>*</span><span class=n>attrs</span><span class=p>:</span> <span class=n><a class="autorefs autorefs-external" title=typing.Dict href=https://docs.python.org/3.12/library/typing.html#typing.Dict>Dict</a></span><span class=p>)</span> <span class=o>-&gt;</span> <span class=n><a class="autorefs autorefs-external" title=typing.Dict href=https://docs.python.org/3.12/library/typing.html#typing.Dict>Dict</a></span>
</code></pre></div> <div class="doc doc-contents first"> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/attributes.py#L131 target=_blank>See source code</a></p> <p>Merge a list of dictionaries into a single dictionary.</p> <p>The dictionaries are treated as HTML attributes and are merged accordingly:</p> <ul> <li>If a same key is present in multiple dictionaries, the values are joined with a space character.</li> <li>The <code>class</code> and <code>style</code> keys are handled specially, similar to <a href=https://vuejs.org/api/render-function#mergeprops>how Vue does it</a>.</li> </ul> <p>Read more about <a href=../../concepts/fundamentals/html_attributes>HTML attributes</a>.</p> <p><strong>Example:</strong></p> <div class=highlight><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=n>merge_attributes</span><span class=p>(</span>
</code></pre></div> <div class="doc doc-contents first"> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/attributes.py#L130 target=_blank>See source code</a></p> <p>Merge a list of dictionaries into a single dictionary.</p> <p>The dictionaries are treated as HTML attributes and are merged accordingly:</p> <ul> <li>If a same key is present in multiple dictionaries, the values are joined with a space character.</li> <li>The <code>class</code> and <code>style</code> keys are handled specially, similar to <a href=https://vuejs.org/api/render-function#mergeprops>how Vue does it</a>.</li> </ul> <p>Read more about <a href=../../concepts/fundamentals/html_attributes>HTML attributes</a>.</p> <p><strong>Example:</strong></p> <div class=highlight><pre><span></span><code><a id=__codelineno-0-1 name=__codelineno-0-1 href=#__codelineno-0-1></a><span class=n>merge_attributes</span><span class=p>(</span>
<a id=__codelineno-0-2 name=__codelineno-0-2 href=#__codelineno-0-2></a> <span class=p>{</span><span class=s2>&quot;my-attr&quot;</span><span class=p>:</span> <span class=s2>&quot;my-value&quot;</span><span class=p>,</span> <span class=s2>&quot;class&quot;</span><span class=p>:</span> <span class=s2>&quot;my-class&quot;</span><span class=p>},</span>
<a id=__codelineno-0-3 name=__codelineno-0-3 href=#__codelineno-0-3></a> <span class=p>{</span><span class=s2>&quot;my-attr&quot;</span><span class=p>:</span> <span class=s2>&quot;extra-value&quot;</span><span class=p>,</span> <span class=s2>&quot;data-id&quot;</span><span class=p>:</span> <span class=s2>&quot;123&quot;</span><span class=p>},</span>
<a id=__codelineno-0-4 name=__codelineno-0-4 href=#__codelineno-0-4></a><span class=p>)</span>

View file

@ -73,7 +73,7 @@
<a id=__codelineno-17-5 name=__codelineno-17-5 href=#__codelineno-17-5></a><span class=x> </span><span class=cp>{%</span> <span class=k>endfill</span> <span class=cp>%}</span>
<a id=__codelineno-17-6 name=__codelineno-17-6 href=#__codelineno-17-6></a><span class=cp>{%</span> <span class=k>endcomponent</span> <span class=cp>%}</span>
</code></pre></div> <h2 id=html_attrs>html_attrs<a class=headerlink href=#html_attrs title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-18-1 name=__codelineno-18-1 href=#__codelineno-18-1></a><span class=cp>{%</span> <span class=k>html_attrs</span> <span class=nv>attrs</span><span class=o>:</span> <span class=nv>Optional</span><span class=o>[</span><span class=nv>Dict</span><span class=o>]</span> <span class=o>=</span> <span class=kp>None</span><span class=o>,</span> <span class=nv>defaults</span><span class=o>:</span> <span class=nv>Optional</span><span class=o>[</span><span class=nv>Dict</span><span class=o>]</span> <span class=o>=</span> <span class=kp>None</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=cp>%}</span>
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L18 target=_blank>See source code</a></p> <p>Generate HTML attributes (<code>key="value"</code>), combining data from multiple sources, whether its template variables or static text.</p> <p>It is designed to easily merge HTML attributes passed from outside with the internal. See how to in <a href=../../guides/howto/passing_html_attrs/ >Passing HTML attributes to components</a>.</p> <p><strong>Args:</strong></p> <ul> <li><code>attrs</code> (dict, optional): Optional dictionary that holds HTML attributes. On conflict, overrides values in the <code>default</code> dictionary.</li> <li><code>default</code> (str, optional): Optional dictionary that holds HTML attributes. On conflict, is overriden with values in the <code>attrs</code> dictionary.</li> <li>Any extra kwargs will be appended to the corresponding keys</li> </ul> <p>The attributes in <code>attrs</code> and <code>defaults</code> are merged and resulting dict is rendered as HTML attributes (<code>key="value"</code>).</p> <p>Extra kwargs (<code>key=value</code>) are concatenated to existing keys. So if we have</p> <div class=highlight><pre><span></span><code><a id=__codelineno-19-1 name=__codelineno-19-1 href=#__codelineno-19-1></a><span class=n>attrs</span> <span class=o>=</span> <span class=p>{</span><span class=s2>&quot;class&quot;</span><span class=p>:</span> <span class=s2>&quot;my-class&quot;</span><span class=p>}</span>
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L18 target=_blank>See source code</a></p> <p>Generate HTML attributes (<code>key="value"</code>), combining data from multiple sources, whether its template variables or static text.</p> <p>It is designed to easily merge HTML attributes passed from outside as well as inside the component.</p> <p><strong>Args:</strong></p> <ul> <li><code>attrs</code> (dict, optional): Optional dictionary that holds HTML attributes. On conflict, overrides values in the <code>default</code> dictionary.</li> <li><code>default</code> (str, optional): Optional dictionary that holds HTML attributes. On conflict, is overriden with values in the <code>attrs</code> dictionary.</li> <li>Any extra kwargs will be appended to the corresponding keys</li> </ul> <p>The attributes in <code>attrs</code> and <code>defaults</code> are merged and resulting dict is rendered as HTML attributes (<code>key="value"</code>).</p> <p>Extra kwargs (<code>key=value</code>) are concatenated to existing keys. So if we have</p> <div class=highlight><pre><span></span><code><a id=__codelineno-19-1 name=__codelineno-19-1 href=#__codelineno-19-1></a><span class=n>attrs</span> <span class=o>=</span> <span class=p>{</span><span class=s2>&quot;class&quot;</span><span class=p>:</span> <span class=s2>&quot;my-class&quot;</span><span class=p>}</span>
</code></pre></div> <p>Then</p> <div class=highlight><pre><span></span><code><a id=__codelineno-20-1 name=__codelineno-20-1 href=#__codelineno-20-1></a><span class=cp>{%</span> <span class=k>html_attrs</span> <span class=nv>attrs</span> <span class=nv>class</span><span class=o>=</span><span class=s2>&quot;extra-class&quot;</span> <span class=cp>%}</span>
</code></pre></div> <p>will result in <code>class="my-class extra-class"</code>.</p> <p><strong>Example:</strong> <div class=highlight><pre><span></span><code><a id=__codelineno-21-1 name=__codelineno-21-1 href=#__codelineno-21-1></a><span class=x>&lt;div </span><span class=cp>{%</span> <span class=k>html_attrs</span>
<a id=__codelineno-21-2 name=__codelineno-21-2 href=#__codelineno-21-2></a> <span class=nv>attrs</span>

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
[
{
"version": "dev",
"title": "dev (5fb0c90)",
"title": "dev (f80457e)",
"aliases": []
},
{