Skip to content

This is an inventory management system of Huizhou Grocery designed by MariaDB

License

Notifications You must be signed in to change notification settings

HuizhouGrocery/IMS-MariaDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huizhou Grocery Inventory Management System

License: MIT

We revised our code and let IMS run on one LAN network, which means two and more desktops can work together. It will become one simple business app.

We need to run both commands in our terminal.

pip install ttkbootstrap
pip install pywinstyles
pip install pymysql

This time we need to go to MariaDB.org to download the database for our Desktop (Laptop). Our testing environment is Windows, and we get Heidi SQL EXE.


When we are installing MariaDB, we will set up the root and default password. You could click a button that lets a remote PC access your MariaDB database, which is important.

After you can run Python code on your terminal, you need to run this code below.

pyinstaller --onefile --name Huizhou-IMS -i logo.png --windowed IMS-MariaDB.py

For now, it is the same as SQLite database. Other PCs can not access your MariaDB database on your current PC, even using this app. Why? We need to let our current PC become a server in one LAN network.

Have you heard of mad-scientists' flask? We are using programmers' flask to let it work. Let us run both commands below.


pip install -U Flask
set FLASK_APP = app

You need to create app.py in your current working directory and copy this code.

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, Flask!</p>"
flask run --host 0.0.0.0 --port 5140

Until now, you will get your LAN address like (192.168.1.80). You could test if you can connect 192.168.1.80 in your browser on other PCs. Definitely, all PCs need to work in one router network (some routers may not support data transfer; they will block servers).

In other PCs, Heidi SQL could change 127.0.0.1 to 192.168.1.80. And you may find you could connect your current MariaDB from other PCs now.

Final step is to change python code(host='192.168.1.80'), this simple app could work in all PCs now. Many people may expect it.

About

This is an inventory management system of Huizhou Grocery designed by MariaDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages