Settings#
- class user_tasks.conf.LazySettings
The behavior of
django-user-tasks
can be customized via the following Django settings.- property USER_TASKS_ARTIFACT_FILTERS
Tuple containing zero or more filters for UserTaskArtifact listing REST API calls.
Each entry should be a Django REST Framework filter backend class object, such as
django_filters.rest_framework.DjangoFilterBackend
. The default value contains onlyuser_tasks.filters.ArtifactFilterBackend
, which allows superusers to see all artifacts but other users to see only those for artifacts they triggered themselves.
- property USER_TASKS_ARTIFACT_STORAGE
File storage backend to use for
user_tasks.models.UserTaskStatus.file
.If explicitly set, the setting should be the import path of a storage backend class.
- property USER_TASKS_MAX_AGE
timedelta
reflecting the age after which UserTaskStatus records should be deleted.For this setting to be useful,
user_tasks.tasks.purge_old_user_tasks
should be configured to run on an appropriate schedule. Note that the age is calculated from task creation, not completion. The default value is 30 days.
- property USER_TASKS_STATUS_FILTERS
Tuple containing zero or more filters for UserTaskStatus listing REST API calls.
Each entry should be a Django REST Framework filter backend class object, such as
django_filters.rest_framework.DjangoFilterBackend
. The default value contains onlyuser_tasks.filters.StatusFilterBackend
, which allows superusers to see all task statuses but other users to see only those for tasks they triggered themselves.