Skip to main content

Django application provides simple task model and admin.

Project description

django-simpletask

Django application provides simple task model and admin.

Install

pip install django-simpletask

Usage

pro/settings

INSTALLED_APPS = [
    'django_db_lock',
]

Note:

  • Mostly you need a lock service, so we add django_db_lock in INSTALLED_APPS.

app/models.py

from django_simpletask.models import SimpleTask


class Task(SimpleTask):
    pass

app/admin.py

from django.contrib import admin
from .models import Task

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

app/management/commands/doTasks.py

import djclick as click
from app.models import SomeSimpleTaskModel

@click.command()
def main():
    SomeSimpleTaskModel.do_tasks()

Release

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.

Source Distribution

django-simpletask-0.1.6.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file django-simpletask-0.1.6.tar.gz.

File metadata

  • Download URL: django-simpletask-0.1.6.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8

File hashes

Hashes for django-simpletask-0.1.6.tar.gz
Algorithm Hash digest
SHA256 52b12527aaeaa3d2da422df30151ff66e6065bf867d43a600187a561f2ed0785
MD5 d4d7ce99efbd9e3dea00d05c29e1c758
BLAKE2b-256 b6b8ce29a4e8387b5409a39566ecfcf094ed5f7924fd54d262cdb6524ea4210f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page