Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 22, 2024
1 parent 1c34f5e commit ec94de5
Show file tree
Hide file tree
Showing 183 changed files with 371 additions and 371 deletions.
12 changes: 6 additions & 6 deletions _sources/customization.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ In standard APIS those models are
The :py:mod:`apis_core.history` module also uses the generic views for
its models. This means that you can use the generic views for the historical
models of your own ontology. E.g. if you have a model ``Person`` in your
``apis_ontology.models`` module, you can use the generic views for it.
``/apis/apis_ontology.historicalperson/``
``your_app.models`` module, you can use the generic views for it.
``/apis/your_app.historicalperson/``
will be the URL for the list view of the historical model.
``/apis/api/apis_ontology.historicalperson/`` for the API view.
``/apis/api/your_app.historicalperson/`` for the API view.

If you want to use the generic app for your own model, simple make your model
inherit from :class:`apis_core.generic.abc.GenericModel`.
Expand All @@ -40,7 +40,7 @@ of results on the right side.
The default filterset used is
:class:`apis_core.generic.filtersets.GenericFilterSet`. You can override the
filterset for you models by defining a custom filterset class in
``you_app.filtersets``. The filterset has to be named ``<Modelname>FilterSet``,
``your_app.filtersets``. The filterset has to be named ``<Modelname>FilterSet``,
so if you have a model ``Person`` in your app ``myproject``, the view looks for
the filterset ``myproject.filtersets.PersonFilterSet``. You can inherit from
:class:`apis_core.generic.filtersets.GenericFilterSet` and add your
Expand All @@ -64,7 +64,7 @@ pagination (which is the default).
The base queryset that is used in the listview, which is then filtered using
the django-filters filter, is ``model.objects.all()`` - but you can override
the queryset by creating a custom queryset for your model in
``you_app.querysets``. The queryset function has to be named
``your_app.querysets``. The queryset function has to be named
``<Modelname>ListViewQueryset``, so if you have a model ``Person`` in your app
``myproject``, the view looks for the queryset
``myproject.querysets.PersonListViewQueryset``.
Expand All @@ -83,7 +83,7 @@ Create and Update views

The create and update view use the form
:class:`apis_core.generic.forms.GenericModelForm` by default. You can override
the form it uses by creating a custom form in ``you_app.forms``. The form class
the form it uses by creating a custom form in ``your_app.forms``. The form class
has to be named ``<Modelname>Form``, so if you have a model ``Person`` in your
app ``myproject``, the view looks for the form class
``myproject.forms.PersonForm``.
Expand Down
12 changes: 6 additions & 6 deletions customization.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ <h1>Customization<a class="headerlink" href="#customization" title="Link to this
<p>The <a class="reference internal" href="modules/apis_core.history.html#module-apis_core.history" title="apis_core.history"><code class="xref py py-mod docutils literal notranslate"><span class="pre">apis_core.history</span></code></a> module also uses the generic views for
its models. This means that you can use the generic views for the historical
models of your own ontology. E.g. if you have a model <code class="docutils literal notranslate"><span class="pre">Person</span></code> in your
<code class="docutils literal notranslate"><span class="pre">apis_ontology.models</span></code> module, you can use the generic views for it.
<code class="docutils literal notranslate"><span class="pre">/apis/apis_ontology.historicalperson/</span></code>
<code class="docutils literal notranslate"><span class="pre">your_app.models</span></code> module, you can use the generic views for it.
<code class="docutils literal notranslate"><span class="pre">/apis/your_app.historicalperson/</span></code>
will be the URL for the list view of the historical model.
<code class="docutils literal notranslate"><span class="pre">/apis/api/apis_ontology.historicalperson/</span></code> for the API view.</p>
<code class="docutils literal notranslate"><span class="pre">/apis/api/your_app.historicalperson/</span></code> for the API view.</p>
<p>If you want to use the generic app for your own model, simple make your model
inherit from <a class="reference internal" href="modules/apis_core.generic.html#apis_core.generic.abc.GenericModel" title="apis_core.generic.abc.GenericModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">apis_core.generic.abc.GenericModel</span></code></a>.</p>
<section id="list-views">
Expand All @@ -134,7 +134,7 @@ <h2>List views<a class="headerlink" href="#list-views" title="Link to this headi
<p>The default filterset used is
<a class="reference internal" href="modules/apis_core.generic.html#apis_core.generic.filtersets.GenericFilterSet" title="apis_core.generic.filtersets.GenericFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">apis_core.generic.filtersets.GenericFilterSet</span></code></a>. You can override the
filterset for you models by defining a custom filterset class in
<code class="docutils literal notranslate"><span class="pre">you_app.filtersets</span></code>. The filterset has to be named <code class="docutils literal notranslate"><span class="pre">&lt;Modelname&gt;FilterSet</span></code>,
<code class="docutils literal notranslate"><span class="pre">your_app.filtersets</span></code>. The filterset has to be named <code class="docutils literal notranslate"><span class="pre">&lt;Modelname&gt;FilterSet</span></code>,
so if you have a model <code class="docutils literal notranslate"><span class="pre">Person</span></code> in your app <code class="docutils literal notranslate"><span class="pre">myproject</span></code>, the view looks for
the filterset <code class="docutils literal notranslate"><span class="pre">myproject.filtersets.PersonFilterSet</span></code>. You can inherit from
<a class="reference internal" href="modules/apis_core.generic.html#apis_core.generic.filtersets.GenericFilterSet" title="apis_core.generic.filtersets.GenericFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">apis_core.generic.filtersets.GenericFilterSet</span></code></a> and add your
Expand All @@ -154,7 +154,7 @@ <h2>List views<a class="headerlink" href="#list-views" title="Link to this headi
<p>The base queryset that is used in the listview, which is then filtered using
the django-filters filter, is <code class="docutils literal notranslate"><span class="pre">model.objects.all()</span></code> - but you can override
the queryset by creating a custom queryset for your model in
<code class="docutils literal notranslate"><span class="pre">you_app.querysets</span></code>. The queryset function has to be named
<code class="docutils literal notranslate"><span class="pre">your_app.querysets</span></code>. The queryset function has to be named
<code class="docutils literal notranslate"><span class="pre">&lt;Modelname&gt;ListViewQueryset</span></code>, so if you have a model <code class="docutils literal notranslate"><span class="pre">Person</span></code> in your app
<code class="docutils literal notranslate"><span class="pre">myproject</span></code>, the view looks for the queryset
<code class="docutils literal notranslate"><span class="pre">myproject.querysets.PersonListViewQueryset</span></code>.</p>
Expand All @@ -171,7 +171,7 @@ <h3>List view templates<a class="headerlink" href="#list-view-templates" title="
<h2>Create and Update views<a class="headerlink" href="#create-and-update-views" title="Link to this heading"></a></h2>
<p>The create and update view use the form
<a class="reference internal" href="modules/apis_core.generic.forms.html#apis_core.generic.forms.GenericModelForm" title="apis_core.generic.forms.GenericModelForm"><code class="xref py py-class docutils literal notranslate"><span class="pre">apis_core.generic.forms.GenericModelForm</span></code></a> by default. You can override
the form it uses by creating a custom form in <code class="docutils literal notranslate"><span class="pre">you_app.forms</span></code>. The form class
the form it uses by creating a custom form in <code class="docutils literal notranslate"><span class="pre">your_app.forms</span></code>. The form class
has to be named <code class="docutils literal notranslate"><span class="pre">&lt;Modelname&gt;Form</span></code>, so if you have a model <code class="docutils literal notranslate"><span class="pre">Person</span></code> in your
app <code class="docutils literal notranslate"><span class="pre">myproject</span></code>, the view looks for the form class
<code class="docutils literal notranslate"><span class="pre">myproject.forms.PersonForm</span></code>.</p>
Expand Down
4 changes: 2 additions & 2 deletions htmlcov/class_index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/function_index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/manage_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_DateParser_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241___init___py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_authentication_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_autocomplete_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_fields_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_filters_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_helpers_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_normalize_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_rdf_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_settings_py.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ec94de5

Please sign in to comment.