Giter Site home page Giter Site logo

app-generator / sample-django-tasks-manager Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 18 KB

Django Tasks Manager - Open-Source Sample | AppSeed

Home Page: https://github.com/app-generator/django-tasks-manager

Python 100.00%
appseed celery django-tasks appseed-sample

sample-django-tasks-manager's Introduction

Django Tasks Manager - How to use it

This repository provides a step-by-step integration of Django Tasks Manager, an open-source Python Library built on top of Celery. In the end, the superusers are able to manage tasks (create, revoke) and visualize the output and runtime logs - The product is actively supported by AppSeed.

Features

  • ✅ Create/Revoke Celery Tasks
  • ✅ View LOGS & Output
  • ✅ Minimal Configuration
  • ✅ Installation via PyPi
  • ✅ Available TASKS (provided as starting samples)
    • users_in_db() - List all registered users
    • execute_script() - let users execute the scripts defined in CELERY_SCRIPTS_DIR (configuration parameter)

Django Tasks Manager - Sample


👉 Added minimal files - v0.0.1 tag

In this phase only the basic files are provided:

  • README.md
  • CHANGELOG.md
  • .gitignore

Besides the files, the Virtual environment is created:

$ python3 -m venv env        # create virtual environment 
$ source env/bin/activate    # actvate the VENV 
$ pip install --upgrade pip  # update PIP

👉 Generate Django Core - v0.0.2 tag

In this phase, the usual commands are used:

$ pip install Django                # Install Django  
$ django-admin startproject core .  # create 'core' project 
$ python manage.py migrate          # migrate DB
$ python manage.py runserver        # Access the basic app in the browser

👉 Install Django TM Package - v0.0.3 tag

The new is installed and the related directories are created:

$ pip install django-tasks-manager  # install the package 
$ mkdir celery_logs                 # here the logs are saved
$ mkdir celery_scripts              # scripts to be executed 

The sample scripts are provided in the Celery Scripts folder.


👉 Update Project Configuration - v0.0.4 tag

Update configuration and routing. Here are the impacted files:

  • core/settings.py
  • core/urls.py

👉 Final set up & Usage - v1.0.0 tag

In this phase the project becomes usable. The database is migrated and a superuser is created to access and manage the tasks.

$ python manage.py makemigrations      # generate the new SQL
$ python manage.py migrate             # migrate (update) DB
$
$ python manage.py createsuperuser     # create the app user
$
$ # Start the application 
$ python manage.py runserver           

Note: The celery task manager should be started using a different terminal

$ celery --app=django_tm.celery.app worker --loglevel=info

Once the superuser is authenticated, the tasks manager should be usable:

http://127.0.0.1:8000/tasks


Django Tasks Manager - Tasks View Log.


Django Tasks Manager - View ALL Tasks.


Django Tasks Manager - View tasks in admin section.



Django Tasks Manager - Free sample provided by AppSeed

sample-django-tasks-manager's People

Contributors

app-generator avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.