Skip to main content

Django application provides simple task model, admin, server services and client service.

Project description


Django application provides simple task model, admin, server services and client service.


pip install django-simpletask






  • Mostly you need a lock service, so we add django_db_lock in INSTALLED_APPS.
  • Set DJANGO_SIMPLETASK_ACLKEY to your own aclkey. It will be used in task executor.


from django_simpletask.models import SimpleTask

class Task(SimpleTask):
    title = models.CharField(max_length=64)

    class Meta:
        permissions = [] + SimpleTask.Meta.permissions

    def do_task_main(self):
        return "done!"


  • Write your own task model based on SimpleTask.
  • Add task reset permission.
  • Implement you own do_task_main.


from django.contrib import admin
from .models import Task

class TaskAdmin(admin.ModelAdmin):
    list_display = ["title", "status"]
    readonly_fields = [] + Task.SIMPLE_TASK_FIELDS


  • Mostly we don't want to change anything inside task, so we set task fields readonly.

from import DaemonApplication
from import SimpleTaskService

class TaskExcutor(DaemonApplication):
    def main(self):
        service = SimpleTaskService("", aclkey="TsE9Jd3TrUtTA9wjGCLXoDqh891srpyo")

app = TaskExcutor().get_controller()

if __name__ == "__main__":


  • Add script.
  • Set the server to your own url.
  • Set the aclkey match the DJANGO_SIMPLETASK_ACLKEY setting.


v0.2.2 2020/12/03

  • Long running service don't use database.
  • Add aclkey check for simpletask apis.

v0.1.6 2020/11/17

  • Add reset action.
  • Add SimpleTask.force_finish.
  • Add multi-threads serve.

v0.1.3 2020/11/09

  • Add idle_sleep_time parameter for SimpleTask.serve_forever.

v0.1.2 2020/11/09

  • Add SimpleTask.serve and SimpleTask.serve_forever.

v0.1.1 2020/10/30

  • Add SimpleTask.do_tasks.

v0.1.0 2020/10/26

  • First release.
  • Take from django-fastadmin. django-fastadmin should forcus on admin extensions, but NOT abstract models.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-simpletask, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size django-simpletask-0.2.2.tar.gz (10.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page