How to install django-uwsgi-taskmanager in an existing project
This documentation is for developers, that want to add this application to their django project.
Note
As a pre-requisite, the project should already be served through uWSGI.
Install the app with pip:
via PyPI:
pip install django-uwsgi-taskmanager
or via GitHub:
pip install git+https://github.com/openpolis/django-uwsgi-taskmanager.git
Add “taskmanager” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ "django.contrib.admin", # ..., "taskmanager", ]
Run
python manage.py migrate
to create the taskmanager tables.Run
collectcommands
management task to create taskmanager commands 1:python manage.py collectcommands --excludecore
Include the taskmanager URLConf in your project
urls.py
(optional) 2:from django.contrib import admin from django.urls import include, path urlpatterns = [ path("admin/", admin.site.urls), path("taskmanager/", include("taskmanager.urls")), ]
Set parameters in your settings file as below (optional):
UWSGI_TASKMANAGER_N_LINES_IN_REPORT_INLINE = 10 UWSGI_TASKMANAGER_N_REPORTS_INLINE = 3 UWSGI_TASKMANAGER_SHOW_LOGVIEWER_LINK = True UWSGI_TASKMANAGER_USE_FILTER_COLLAPSE = True UWSGI_TASKMANAGER_SAVE_LOGFILE = False
Configure the notifications, following the How to enable notifications guide (optional).
Footnotes