Skip to content

Commit

Permalink
docs(history): add documentation on some management commands
Browse files Browse the repository at this point in the history
resolves #873
  • Loading branch information
sennierer committed Aug 27, 2024
1 parent 8559c49 commit 9a41aa5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/source/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,32 @@ can be accessed under `/apis/swagger/schema/swagger-ui/#/apis/apis_api_history_e
.. _django-simple-history: https://django-simple-history.readthedocs.io/en/latest/


Management Commands
^^^^^^^^^^^^^^^^^^^

The APIS history plugin is based on the `django-simple-history` package. It comes with
management commands provided by `django-simple-history`. Some of the more useful commands are:

.. code-block:: bash
python manage.py populate_history --auto
This command will populate the history tables with the current state of the models. This is useful
if you have added the `VersionMixin` to an existing model.

.. code-block:: bash
python manage.py clean_duplicate_history --auto
This command will clean up duplicate history entries.

.. code-block:: bash
python manage.py clean_old_history --days 60 --auto
This command will clean up history entries older than 60 days.


Collections plugin
------------------

Expand Down

0 comments on commit 9a41aa5

Please sign in to comment.