Package: django-tasks-manager
Django Tasks ManagerA super simpleDjango & Celeryintegration - This library is actively supported byAppSeed.Features:Create/RevokeCelery TasksView LOGS& OutputMinimal ConfigurationAvailableTASKS(provided as starting samples)users_in_db()- List all registered usersexecute_script()- let users execute thescriptsdefined inCELERY_SCRIPTS_DIR(CFG parameter)check-db-health.py(sample)How to use itInstall the packageviaPIP$pipinstalldjango-tasks-manager
//OR
$pipinstallgit+https://github.com/app-generator/django-tasks-manager.gitInclude the new routing# core/urls.pyfromdjango.urlsimportpath,include# <-- UPDATE: Add 'include' HELPERurlpatterns=[...path("",include("django_tm.urls")),# <-- New Routes...]CreateScrips & LOGSdirectories - The Recomended place is in the root of the project:$mkdircelery_scripts# Used in Settings -> CELERY_SCRIPTS_DIR$mkdircelery_logs# Used in Settings -> CELERY_SCRIPTS_DIRMake sure the user that executes the app has write permission.Copy thesample scriptsin the scripts directory.All scripts will be available in the UI, ready to be executed by the manager.Update ConfigurationAddosobject importimportos# <-- NEWUpdate Configuration: Include the new APPSINSTALLED_APPS=[...'django_tm',# Django Tasks Manager   # <-- NEW'django_celery_results',# Django Celery Results  # <-- NEW]Update Configuration: Include the new templatesTEMPLATE_DIR_TASKS=os.path.join(BASE_DIR,"django_tm/templates")# <-- NEWTEMPLATES=[{'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS':[TEMPLATE_DIR_TASKS],# <-- Updated'APP_DIRS':True,},]Update Configuration: NewCELERY_Section############################################################## Celery configurations# https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html# !!!# BASE_DIR points to the ROOT of the project# Note: make sure you have 'os' object imported# !!!# !!!# BASE_DIR = os.path.dirname(os.path.dirname(__file__))# !!!# Working Directories required write permissionCELERY_SCRIPTS_DIR=os.path.join(BASE_DIR,"celery_scripts")CELERY_LOGS_DIR=os.path.join(BASE_DIR,"celery_logs")CELERY_BROKER_URL=os.environ.get("CELERY_BROKER","redis://localhost:6379")CELERY_RESULT_BACKEND=os.environ.get("CELERY_BROKER","redis://localhost:6379")CELERY_TASK_TRACK_STARTED=TrueCELERY_TASK_TIME_LIMIT=30*60CELERY_CACHE_BACKEND="django-cache"CELERY_RESULT_BACKEND="django-db"CELERY_RESULT_EXTENDED=TrueCELERY_RESULT_EXPIRES=60*60*24*30# Results expire after 1 monthCELERY_ACCEPT_CONTENT=["json"]CELERY_TASK_SERIALIZER='json'CELERY_RESULT_SERIALIZER='json'##########################################################################################################################Start the App$# Set up the database$pythonmanage.pymakemigrations
$pythonmanage.pymigrate
$
$# Create the superuser$pythonmanage.pycreatesuperuser
$
$# Start the application (development mode)$pythonmanage.pyrunserver# default port 8000AuthenticateassuperuserAccess theTaskspage:http://127.0.0.1:8000/tasksStart the Celery Manager(another terminal) &Update EnvironmentExportDJANGO_SETTINGS_MODULEusing the value provided inmanage.py$exportDJANGO_SETTINGS_MODULE=cfg.settingsThe value used export should be taken frommanage.py:defmain():"""Run administrative tasks."""os.environ.setdefault("DJANGO_SETTINGS_MODULE","cfg.settings")# <-- VALUE to be exportedtry:fromdjango.core.managementimportexecute_from_command_lineexceptImportErrorasexc:...Note:Redisserver is expected on port6379(default). In case Redis runs on otherPORT, please update the configuration:CELERY_BROKER_URLandCELERY_RESULT_BACKEND.$celery--app=django_tm.celery.appworker--loglevel=infoScreensView all tasksView Task LOGLinks & ResourcesFreeSupportvia Email and DiscordDjango Tasks Manager-free samplethat explains:Project Creation(minimal files added)Install& GenerateDjangoCoreInstallDjango-TM(this package)Update ConfigurationStart the appUse theTasks ManagerDjango Tasks Manager- Open-source library provided byAppSeed