End of shift manager for print room and warehouse
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Tom Lee-Gough f9b871057d fixed add production bug 1 year ago
instance Added readme file 1 year ago
printer fixed add production bug 1 year ago
tests Version 1.0 1 year ago
app.yaml Version 1.0 1 year ago
readme.md updated readme 1 year ago
requiremets.txt Version 1.0 1 year ago

readme.md

README.MD

This is the Henderson Design Group end of shift reporter for the warehouse and print room.

Installation Instructions

  1. Install MariaDB / MySQL on your system
  2. Create a database and database user for the project
  3. Create a new config.py file. See example_config.py in the INSTANCE folder.
  4. Create a Python Virtual Envirtonment and install modules
  • python3 -m venv venv
  • source activate ven/bin/actiate
  • pip install -r requirements.txt
  1. Complete database creation
  2. Run printer
  3. Enjoy!

Creating Initial database

Run MariaDB / MySQL CREATE {database} USE {database} CREATE USER '{user}'@'localhost' INDENTIFIED BY '{password}'; GRANT ALL PRIVILEGES ON '{database}'.* TO '{user}'@localhost; FLUSH PRIVILEGES;

Run Flask Shell

  • WINDOWS
  • set FLASK_APP=printer
  • set FLASK_ENV=development
  • flask shell
  • Mac / Linux
  • export FLASK_APP=printer
  • export FLASK_ENV=development
  • flask shell

Create tables and initial data:

  • from printer import db

  • from printer.db import *

  • from uuid import uuid4

  • from werkzeug.security import check_password_hash, generate_password_hash

  • db.create_all()

  • brands = ['Lust', 'I Love Wallpaper']

  • groups = ['staff', 'admin']

  • prod_types = ['Sample', 'Print']

  • category = ['Wallpaper', 'XL Mural', 'Mural']

  • for b in brands: db.session.add(Brand(brand_id = str( uuid4() ),brand_name = b))

  • for g in groups: db.session.add(Usergroups(group_id = str( uuid4() ),group_name = g))

  • for p in prod_types: db.session.add(Prodtype(prod_type_id = str( uuid4() ),prod_type_name = p))

  • for c in category: db.session.add(Category(cat_id = str( uuid4() ),cat_name = c))

  • db.session.add( User( user_id = str(uuid4()), user_name = 'admin', user_pass = generate_password_hash('admin'), group_id_fk='{}' ) )

  • db.session.add( User( user_id = str(uuid4()), user_name = 'user', user_pass = generate_password_hash('user'), group_id_fk='{}' ) )

  • db.session.commit()