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 11, 2024
1 parent 80e0054 commit 26e9219
Show file tree
Hide file tree
Showing 182 changed files with 455 additions and 418 deletions.
19 changes: 19 additions & 0 deletions _sources/features.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ The :py:mod:`apis_core.history` module provides versioning
for APIS. It is based on the `django-simple-history`_
package.

Track changes by users
^^^^^^^^^^^^^^^^^^^^^^

To record the user who made a change, the `django-simple-history` module
used by APIS provides a middleware that sets the `history_user` attribute of
the request object to the current user. It then saves this information to the
`history_user` attribute of the historical record.
To activate the middleware, add `simple_history.middleware.HistoryRequestMiddleware`
to your `MIDDLEWARE` setting:

.. code-block:: python
MIDDLEWARE = [
...
'apis_core.history.middleware.HistoryRequestMiddleware',
...
]
VersionMixin
^^^^^^^^^^^^

Expand Down
17 changes: 17 additions & 0 deletions features.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<li class="toctree-l1"><a class="reference internal" href="customization.html">Customization</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Additional Features</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#history-plugin">History plugin</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#track-changes-by-users">Track changes by users</a></li>
<li class="toctree-l3"><a class="reference internal" href="#versionmixin">VersionMixin</a></li>
<li class="toctree-l3"><a class="reference internal" href="#api-endpoint">API endpoint</a></li>
<li class="toctree-l3"><a class="reference internal" href="#management-commands">Management Commands</a></li>
Expand Down Expand Up @@ -104,6 +105,22 @@ <h2>History plugin<a class="headerlink" href="#history-plugin" title="Link to th
<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 provides versioning
for APIS. It is based on the <a class="reference external" href="https://django-simple-history.readthedocs.io/en/latest/">django-simple-history</a>
package.</p>
<section id="track-changes-by-users">
<h3>Track changes by users<a class="headerlink" href="#track-changes-by-users" title="Link to this heading"></a></h3>
<p>To record the user who made a change, the <cite>django-simple-history</cite> module
used by APIS provides a middleware that sets the <cite>history_user</cite> attribute of
the request object to the current user. It then saves this information to the
<cite>history_user</cite> attribute of the historical record.
To activate the middleware, add <cite>simple_history.middleware.HistoryRequestMiddleware</cite>
to your <cite>MIDDLEWARE</cite> setting:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">MIDDLEWARE</span> <span class="o">=</span> <span class="p">[</span>
<span class="o">...</span>
<span class="s1">&#39;apis_core.history.middleware.HistoryRequestMiddleware&#39;</span><span class="p">,</span>
<span class="o">...</span>
<span class="p">]</span>
</pre></div>
</div>
</section>
<section id="versionmixin">
<h3>VersionMixin<a class="headerlink" href="#versionmixin" title="Link to this heading"></a></h3>
<p>The <a class="reference internal" href="modules/apis_core.history.html#apis_core.history.models.VersionMixin" title="apis_core.history.models.VersionMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">apis_core.history.models.VersionMixin</span></code></a> class is a mixin
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.

2 changes: 1 addition & 1 deletion htmlcov/status.json

Large diffs are not rendered by default.

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.

4 changes: 2 additions & 2 deletions htmlcov/z_079cb04380c5d241_test_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_test_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_test_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_test_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_0b6d599bfac90e15___init___py.html

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

Loading

0 comments on commit 26e9219

Please sign in to comment.