Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 27, 2024
1 parent 4fd52da commit 7936ae0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _modules/apis_core/apis_entities/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ <h1>Source code for apis_core.apis_entities.forms</h1><div class="highlight"><pr
<span class="n">queryset</span><span class="o">=</span><span class="n">ct</span><span class="o">.</span><span class="n">model_class</span><span class="p">()</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">uri</span> <span class="o">=</span> <span class="n">reverse</span><span class="p">(</span><span class="s2">&quot;apis_core:generic:autocomplete&quot;</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">[</span><span class="n">ct</span><span class="p">])</span>
<span class="n">attrs</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;data-placeholder&quot;</span><span class="p">:</span> <span class="s2">&quot;Search ...&quot;</span><span class="p">,</span> <span class="s2">&quot;data-minimum-input-length&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span>
<span class="n">attrs</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;data-placeholder&quot;</span><span class="p">:</span> <span class="s2">&quot;Search ...&quot;</span><span class="p">,</span>
<span class="s2">&quot;data-minimum-input-length&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
<span class="s2">&quot;data-html&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="p">}</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">&quot;uri&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">widget</span> <span class="o">=</span> <span class="n">autocomplete</span><span class="o">.</span><span class="n">ModelSelect2</span><span class="p">(</span><span class="n">uri</span><span class="p">,</span> <span class="n">attrs</span><span class="o">=</span><span class="n">attrs</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">&quot;uri&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">widget</span><span class="o">.</span><span class="n">choices</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">&quot;uri&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">choices</span>
<span class="n">entitytype</span> <span class="o">=</span> <span class="n">instance</span><span class="o">.</span><span class="n">_meta</span><span class="o">.</span><span class="n">verbose_name</span>
Expand Down

0 comments on commit 7936ae0

Please sign in to comment.