django-auditlog/docs/source/installation.rst
Jannis Leidel 910089597e
Initial GitHub Actions workflow. (#283)
* Initial GitHub Actions workflow.

* Use correct Postgres port.

* Fix duplicate.

* Use POSTGRES_HOST?

* Fixing postgres config?

* Pass test env vars with Tox.

* Work around issue with Django 3.1.

* Write coverage file.

* Add release workflow.

* Remove Travis config file.

* Update .github/workflows/test.yml

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Update auditlog_tests/tests.py

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Update .github/workflows/test.yml

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Update README.md

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Add Django 3.1 to tox config.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-11-26 10:45:20 +01:00

28 lines
1.2 KiB
ReStructuredText

Installation
============
Installing Auditlog is simple and straightforward. First of all, you need a copy of Auditlog on your system. The easiest
way to do this is by using the Python Package Index (PyPI). Simply run the following command:
``pip install django-auditlog``
Instead of installing Auditlog via PyPI, you can also clone the Git repository or download the source code via GitHub.
The repository can be found at https://github.com/jazzband/django-auditlog/.
**Requirements**
- Python 3.5 or higher
- Django 2.2 or higher
Auditlog is currently tested with Python 3.5 - 3.8 and Django 2.2, 3.0 and 3.1. The latest test report can be found
at https://github.com/jazzband/django-auditlog/actions.
Adding Auditlog to your Django application
------------------------------------------
To use Auditlog in your application, just add ``'auditlog'`` to your project's ``INSTALLED_APPS`` setting and run
``manage.py migrate`` to create/upgrade the necessary database structure.
If you want Auditlog to automatically set the actor for log entries you also need to enable the middleware by adding
``'auditlog.middleware.AuditlogMiddleware'`` to your ``MIDDLEWARE_CLASSES`` setting. Please check :doc:`usage` for more
information.