Giter VIP home page Giter VIP logo

tornado-dcoleman-mtasks-viewer's Introduction

docs/source/_static/img/dcoleman-viewer.png

(Tornado) Django Coleman Viewer

IN PROGRESS: Simple web application to view task orders from Django Coleman, built with Tornado Framework.

This is just a PoC using Tornado web framework and Python 3+ async programming, and Django Coleman as API, it's not a full featured, production ready application.

Requirements

  • Python 3.6+
  • Tornado framework installed (tested with version 6 and 6.1)
  • Django Coleman running at the URL pointed by the DCOLEMAN_ENDPOINT environment variable (by default it uses http://localhost:8000/api/v1)

Install and Run

Install tornado with:

$ pip3 install tornado

(use virtual environments!)

Run with:

$ ./app.py

Run changing the Django Coleman endpoint with:

$ DCOLEMAN_ENDPOINT=http://HOSTNAME/api/v1 ./app.py

Access the application

If the order number is 123, the URL to access it is: http://localhost:8888/123?t=porgs

The argument t is the master token, by default porgs...

https://media.giphy.com/media/3ohhwqOVlEbBxEbss0/giphy.gif

... but each time Django Coleman creates an order, it sends an email with the order URL signed with a unique token so users cannot reuse the token to see other orders.

Settings

Environment variable Default value Description
DCOLEMAN_ENDPOINT http://localhost:8000/api/v1 Django Coleman API URL
DCOLEMAN_MASTER_TOKEN porgs Master token (CHANGE IT in production)
DCOLEMAN_TASKS_VIEWER_HASH_SALT 1two3 Same value than TASKS_VIEWER_HASH_SALT in Django Coleman

Docker

A reference Dockerfile is provided, that's is going to be published in Docker Hub (in progress).

Also a docker-compose.yml is provided, you can build and run the the app with Docker Compose with:

$ docker-compose up

Although when using Docker Compose, it's recommended to use the compose file from the Django Coleman project instead of the local here, that allows to run all: Django Coleman, this Viewer app and Postgres at once.

About

Project: https://github.com/mrsarm/tornado-dcoleman-mtasks-viewer

Authors: (2019-2022) Mariano Ruiz <[email protected]>

License: AGPL-v3

tornado-dcoleman-mtasks-viewer's People

Contributors

mrsarm 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.