Common functionality across different Django projects of the UofC UIS Automation team
Automation Common is a simple Django app that provides common functionality across different Django projects of the UofC UIS Automation team.
Add “automationcommon” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'automationcommon', ]
Include the automationcommon URLconf in your project urls.py like this:
python manage.py migrateto create the automationcommon models.
All module logging writes to a logger named ‘automationcommon’
The unittests can be run using the runtests.py script.
This module has an audit trail feature that allows you to capture update to / deletes of selected models. To track changes to a model simple use the ModelChangeMixin (preceding models.Model). To capture the “editor” use automationcommon.models.set_local_user() to set the user to be used in the audit trail or configure your app like this:
MIDDLEWARE_CLASSES = ( ... 'automationcommon.middleware.RequestUserMiddleware', ... )