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.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.3.tar.gz (6.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: django-simpletask-0.1.3.tar.gz
  • Upload date:
  • Size: 6.5 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.3.tar.gz
Algorithm Hash digest
SHA256 e0832823cf2d900da59c107b71f3281337cf63019e3d499625b739f4481784d1
MD5 a7202a458c2b00b31bd4d91e404dc6d2
BLAKE2b-256 4155af36422de45f8f273f98ecde3f3f8cace6d24f2c7569bd36b218059b5a8a

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