Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 29, 2024
1 parent d951ec5 commit 14de3d8
Show file tree
Hide file tree
Showing 16 changed files with 521 additions and 1,102 deletions.
164 changes: 164 additions & 0 deletions _modules/apis_core/apis_relations/filtersets.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>apis_core.apis_relations.filtersets &mdash; APIS 1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=f2a433a1"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../../../index.html" class="icon icon-home">
APIS
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Documentation:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../installation.html">Installation with Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../installation.html#installation-without-docker">Installation without Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../user_documentation.html">User documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../data_model.html">Data Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../development.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../collections.html">Working with collections</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Internals:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../genindex.html">Index</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../py-modindex.html">Module Index</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">APIS</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
<li class="breadcrumb-item active">apis_core.apis_relations.filtersets</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for apis_core.apis_relations.filtersets</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">apis_core.generic.filtersets</span> <span class="kn">import</span> <span class="n">GenericFilterSet</span><span class="p">,</span> <span class="n">GenericFilterSetForm</span>
<span class="kn">from</span> <span class="nn">django_filters</span> <span class="kn">import</span> <span class="n">CharFilter</span>

<span class="n">PROPERTY_EXCLUDES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;self_contenttype&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;property_class_uri&quot;</span><span class="p">,</span> <span class="s2">&quot;rootobject_ptr&quot;</span><span class="p">]</span>


<div class="viewcode-block" id="PropertyFilterSetForm">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.PropertyFilterSetForm">[docs]</a>
<span class="k">class</span> <span class="nc">PropertyFilterSetForm</span><span class="p">(</span><span class="n">GenericFilterSetForm</span><span class="p">):</span>
<span class="n">columns_exclude</span> <span class="o">=</span> <span class="n">PROPERTY_EXCLUDES</span></div>



<div class="viewcode-block" id="PropertyFilterSet">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.PropertyFilterSet">[docs]</a>
<span class="k">class</span> <span class="nc">PropertyFilterSet</span><span class="p">(</span><span class="n">GenericFilterSet</span><span class="p">):</span>
<span class="n">name_forward</span> <span class="o">=</span> <span class="n">CharFilter</span><span class="p">(</span><span class="n">lookup_expr</span><span class="o">=</span><span class="s2">&quot;icontains&quot;</span><span class="p">)</span>
<span class="n">name_reverse</span> <span class="o">=</span> <span class="n">CharFilter</span><span class="p">(</span><span class="n">lookup_expr</span><span class="o">=</span><span class="s2">&quot;icontains&quot;</span><span class="p">)</span>

<div class="viewcode-block" id="PropertyFilterSet.Meta">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.PropertyFilterSet.Meta">[docs]</a>
<span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<span class="n">form</span> <span class="o">=</span> <span class="n">PropertyFilterSetForm</span>
<span class="n">exclude</span> <span class="o">=</span> <span class="n">PROPERTY_EXCLUDES</span></div>
</div>



<div class="viewcode-block" id="TripleFilterSet">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.TripleFilterSet">[docs]</a>
<span class="k">class</span> <span class="nc">TripleFilterSet</span><span class="p">(</span><span class="n">GenericFilterSet</span><span class="p">):</span>
<span class="n">subj</span> <span class="o">=</span> <span class="n">CharFilter</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s2">&quot;subj_icontains&quot;</span><span class="p">)</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">CharFilter</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s2">&quot;obj_icontains&quot;</span><span class="p">)</span>

<div class="viewcode-block" id="TripleFilterSet.subj_icontains">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.TripleFilterSet.subj_icontains">[docs]</a>
<span class="k">def</span> <span class="nf">subj_icontains</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">queryset</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">return</span> <span class="n">queryset</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">subj__name__icontains</span><span class="o">=</span><span class="n">value</span><span class="p">)</span></div>


<div class="viewcode-block" id="TripleFilterSet.obj_icontains">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.filtersets.TripleFilterSet.obj_icontains">[docs]</a>
<span class="k">def</span> <span class="nf">obj_icontains</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">queryset</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">return</span> <span class="n">queryset</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">obj__name__icontains</span><span class="o">=</span><span class="n">value</span><span class="p">)</span></div>
</div>

</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2021, Matthias Schlögl.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>apis_core.apis_relations.forms2 &mdash; APIS 1.0 documentation</title>
<title>apis_core.apis_relations.forms &mdash; APIS 1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />

Expand Down Expand Up @@ -76,7 +76,7 @@
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
<li class="breadcrumb-item active">apis_core.apis_relations.forms2</li>
<li class="breadcrumb-item active">apis_core.apis_relations.forms</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
Expand All @@ -85,7 +85,7 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><pre>
<h1>Source code for apis_core.apis_relations.forms</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">copy</span>

<span class="kn">from</span> <span class="nn">crispy_forms.helper</span> <span class="kn">import</span> <span class="n">FormHelper</span>
Expand All @@ -108,12 +108,12 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm">[docs]</a>
<span class="k">class</span> <span class="nc">GenericTripleForm</span><span class="p">(</span><span class="n">forms</span><span class="o">.</span><span class="n">ModelForm</span><span class="p">):</span>
<span class="c1"># TODO RDF : Add Notes and references</span>

<div class="viewcode-block" id="GenericTripleForm.Meta">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.Meta">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.Meta">[docs]</a>
<span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">TempTriple</span>
<span class="n">fields</span> <span class="o">=</span> <span class="p">[</span>
Expand Down Expand Up @@ -186,7 +186,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><
<span class="bp">self</span><span class="o">.</span><span class="n">helper</span><span class="o">.</span><span class="n">include_media</span> <span class="o">=</span> <span class="kc">False</span>

<div class="viewcode-block" id="GenericTripleForm.load_subj_obj_prop">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.load_subj_obj_prop">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.load_subj_obj_prop">[docs]</a>
<span class="k">def</span> <span class="nf">load_subj_obj_prop</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">entity_instance_self</span><span class="p">,</span>
Expand Down Expand Up @@ -241,7 +241,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm.load_remaining_data_from_triple">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.load_remaining_data_from_triple">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.load_remaining_data_from_triple">[docs]</a>
<span class="k">def</span> <span class="nf">load_remaining_data_from_triple</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">triple</span><span class="p">):</span>
<span class="c1"># Most data is loaded via the set_subj_obj function.</span>
<span class="c1"># Here, load the rest from a pre-existing triple.</span>
Expand All @@ -257,7 +257,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm.load_remaining_data_from_input">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.load_remaining_data_from_input">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.load_remaining_data_from_input">[docs]</a>
<span class="k">def</span> <span class="nf">load_remaining_data_from_input</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">start_date_written</span><span class="p">,</span>
Expand All @@ -271,7 +271,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm.save">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.save">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.save">[docs]</a>
<span class="k">def</span> <span class="nf">save</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">instance</span><span class="o">.</span><span class="n">pk</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>

Expand All @@ -296,7 +296,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm.get_text_id">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.get_text_id">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.get_text_id">[docs]</a>
<span class="k">def</span> <span class="nf">get_text_id</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Function to retrieve the highlighted text.</span>
Expand All @@ -306,7 +306,7 @@ <h1>Source code for apis_core.apis_relations.forms2</h1><div class="highlight"><


<div class="viewcode-block" id="GenericTripleForm.get_html_table">
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms2.GenericTripleForm.get_html_table">[docs]</a>
<a class="viewcode-back" href="../../../modules/apis_core.apis_relations.html#apis_core.apis_relations.forms.GenericTripleForm.get_html_table">[docs]</a>
<span class="k">def</span> <span class="nf">get_html_table</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">entity_instance_self</span><span class="p">,</span> <span class="n">entity_instance_other</span><span class="p">):</span>
<span class="n">table_class</span> <span class="o">=</span> <span class="n">get_generic_triple_table</span><span class="p">(</span>
<span class="n">other_entity_class_name</span><span class="o">=</span><span class="n">entity_instance_other</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span>
Expand Down
Loading

0 comments on commit 14de3d8

Please sign in to comment.