Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 18, 2023
1 parent 5da2e2b commit 753e48e
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 230 deletions.
12 changes: 0 additions & 12 deletions _modules/apis_core/apis_entities/edit_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ <h1>Source code for apis_core.apis_entities.edit_generic</h1><div class="highlig
<span class="kn">from</span> <span class="nn">apis_core.apis_relations.tables</span> <span class="kn">import</span> <span class="n">get_generic_triple_table</span>
<span class="kn">from</span> <span class="nn">.forms</span> <span class="kn">import</span> <span class="n">get_entities_form</span><span class="p">,</span> <span class="n">GenericEntitiesStanbolForm</span>
<span class="kn">from</span> <span class="nn">.views</span> <span class="kn">import</span> <span class="n">set_session_variables</span>
<span class="kn">from</span> <span class="nn">..apis_vocabularies.models</span> <span class="kn">import</span> <span class="n">TextType</span>
<span class="kn">from</span> <span class="nn">apis_core.utils</span> <span class="kn">import</span> <span class="n">helpers</span>
<span class="kn">from</span> <span class="nn">apis_core.utils.settings</span> <span class="kn">import</span> <span class="n">get_entity_settings_by_modelname</span>
<span class="kn">from</span> <span class="nn">apis_core.apis_entities.mixins</span> <span class="kn">import</span> <span class="n">EntityMixin</span><span class="p">,</span> <span class="n">EntityInstanceMixin</span>
Expand Down Expand Up @@ -175,17 +174,6 @@ <h1>Source code for apis_core.apis_entities.edit_generic</h1><div class="highlig
<span class="n">form</span> <span class="o">=</span> <span class="n">form</span><span class="p">(</span><span class="n">instance</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">instance</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;apis_bibsonomy&quot;</span> <span class="ow">in</span> <span class="n">settings</span><span class="o">.</span><span class="n">INSTALLED_APPS</span><span class="p">:</span>
<span class="n">apis_bibsonomy</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">&quot;APIS_BIBSONOMY_FIELDS&quot;</span><span class="p">,</span> <span class="p">[])</span>
<span class="n">apis_bibsonomy_texts</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">&quot;APIS_BIBSONOMY_TEXTS&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">if</span> <span class="n">apis_bibsonomy_texts</span><span class="p">:</span>
<span class="n">apis_bibsonomy</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span>
<span class="p">[</span>
<span class="sa">f</span><span class="s2">&quot;text_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">pk</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">for</span> <span class="n">pk</span> <span class="ow">in</span> <span class="n">TextType</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
<span class="n">name__in</span><span class="o">=</span><span class="n">apis_bibsonomy_texts</span>
<span class="p">)</span><span class="o">.</span><span class="n">values_list</span><span class="p">(</span><span class="s2">&quot;pk&quot;</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">if</span> <span class="sa">f</span><span class="s2">&quot;text_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">pk</span><span class="si">}</span><span class="s2">&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">apis_bibsonomy</span>
<span class="p">]</span>
<span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">apis_bibsonomy</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<span class="n">apis_bibsonomy</span> <span class="o">=</span> <span class="s2">&quot;|&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">x</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">apis_bibsonomy</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
1 change: 0 additions & 1 deletion _modules/apis_core/apis_entities/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ <h1>Source code for apis_core.apis_entities.forms</h1><div class="highlight"><pr
<span class="kn">from</span> <span class="nn">django.urls</span> <span class="kn">import</span> <span class="n">reverse</span>

<span class="kn">from</span> <span class="nn">apis_core.apis_metainfo.models</span> <span class="kn">import</span> <span class="n">Uri</span><span class="p">,</span> <span class="n">Collection</span>
<span class="kn">from</span> <span class="nn">apis_core.apis_vocabularies.models</span> <span class="kn">import</span> <span class="n">TextType</span>
<span class="kn">from</span> <span class="nn">apis_core.utils</span> <span class="kn">import</span> <span class="n">DateParser</span><span class="p">,</span> <span class="n">caching</span><span class="p">,</span> <span class="n">settings</span> <span class="k">as</span> <span class="n">apis_settings</span>
<span class="kn">from</span> <span class="nn">apis_core.utils.settings</span> <span class="kn">import</span> <span class="n">get_entity_settings_by_modelname</span>
<span class="kn">from</span> <span class="nn">.fields</span> <span class="kn">import</span> <span class="n">ListSelect2</span><span class="p">,</span> <span class="n">Select2Multiple</span>
Expand Down
20 changes: 0 additions & 20 deletions _modules/apis_core/apis_vocabularies/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,26 +242,6 @@ <h1>Source code for apis_core.apis_vocabularies.models</h1><div class="highlight

<span class="k">pass</span></div>



<span class="c1"># TODO RDF: Remove this</span>
<div class="viewcode-block" id="TextType">
<a class="viewcode-back" href="../../../modules/apis_core.apis_vocabularies.html#apis_core.apis_vocabularies.models.TextType">[docs]</a>
<span class="nd">@reversion</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">follow</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;vocabsbaseclass_ptr&quot;</span><span class="p">])</span>
<span class="k">class</span> <span class="nc">TextType</span><span class="p">(</span><span class="n">VocabsBaseClass</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;used to store the Text types for the forms&quot;&quot;&quot;</span>

<span class="n">entity</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">255</span><span class="p">)</span>
<span class="n">collections</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ManyToManyField</span><span class="p">(</span><span class="s2">&quot;apis_metainfo.Collection&quot;</span><span class="p">,</span> <span class="n">blank</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">lang</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span>
<span class="n">max_length</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
<span class="n">blank</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">null</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">help_text</span><span class="o">=</span><span class="s2">&quot;The ISO 639-3 (or 2) code for the label&#39;s language.&quot;</span><span class="p">,</span>
<span class="n">verbose_name</span><span class="o">=</span><span class="s2">&quot;ISO Code&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="s2">&quot;deu&quot;</span><span class="p">,</span>
<span class="p">)</span></div>

</pre></div>

</div>
Expand Down
23 changes: 0 additions & 23 deletions _modules/apis_core/apis_vocabularies/serializers.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ <h1>Source code for apis_core.apis_vocabularies.serializers</h1><div class="high
<span class="kn">from</span> <span class="nn">rest_framework</span> <span class="kn">import</span> <span class="n">serializers</span>

<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">TextType</span><span class="p">,</span>
<span class="n">CollectionType</span><span class="p">,</span>
<span class="n">VocabsBaseClass</span><span class="p">,</span>
<span class="n">VocabNames</span><span class="p">,</span>
Expand Down Expand Up @@ -233,28 +232,6 @@ <h1>Source code for apis_core.apis_vocabularies.serializers</h1><div class="high
<span class="c1">###########################################################</span>


<div class="viewcode-block" id="TextTypeSerializer">
<a class="viewcode-back" href="../../../modules/apis_core.apis_vocabularies.html#apis_core.apis_vocabularies.serializers.TextTypeSerializer">[docs]</a>
<span class="k">class</span> <span class="nc">TextTypeSerializer</span><span class="p">(</span><span class="n">VocabsBaseSerializer</span><span class="p">):</span>
<span class="n">url</span> <span class="o">=</span> <span class="n">serializers</span><span class="o">.</span><span class="n">HyperlinkedIdentityField</span><span class="p">(</span>
<span class="n">view_name</span><span class="o">=</span><span class="s2">&quot;apis:apis_api:texttype-detail&quot;</span><span class="p">,</span> <span class="n">lookup_field</span><span class="o">=</span><span class="s2">&quot;pk&quot;</span>
<span class="p">)</span>
<span class="n">collections</span> <span class="o">=</span> <span class="n">serializers</span><span class="o">.</span><span class="n">HyperlinkedRelatedField</span><span class="p">(</span>
<span class="n">view_name</span><span class="o">=</span><span class="s2">&quot;apis:apis_api:collection-detail&quot;</span><span class="p">,</span>
<span class="n">lookup_field</span><span class="o">=</span><span class="s2">&quot;pk&quot;</span><span class="p">,</span>
<span class="n">many</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">read_only</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="p">)</span>

<div class="viewcode-block" id="TextTypeSerializer.Meta">
<a class="viewcode-back" href="../../../modules/apis_core.apis_vocabularies.html#apis_core.apis_vocabularies.serializers.TextTypeSerializer.Meta">[docs]</a>
<span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<span class="n">fields</span> <span class="o">=</span> <span class="s2">&quot;__all__&quot;</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">TextType</span></div>
</div>



<span class="c1"># TODO RDF: Check if this should be removed or adapted</span>
<span class="c1">#</span>
<span class="c1"># class InstitutionTypeSerializer(VocabsBaseSerializer):</span>
Expand Down
1 change: 0 additions & 1 deletion _modules/apis_core/utils/test_caching.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ <h1>Source code for apis_core.utils.test_caching</h1><div class="highlight"><pre
<span class="p">],</span>
<span class="s2">&quot;apis_vocabularies&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;CollectionType&quot;</span><span class="p">,</span>
<span class="s2">&quot;TextType&quot;</span><span class="p">,</span>
<span class="s2">&quot;VocabNames&quot;</span><span class="p">,</span>
<span class="s2">&quot;VocabsBaseClass&quot;</span><span class="p">,</span>
<span class="s2">&quot;VocabsUri&quot;</span><span class="p">,</span>
Expand Down
Loading

0 comments on commit 753e48e

Please sign in to comment.