Fix: Cleanup \n 1. Remove PostgreSQL \n 2. Remove comments from Python \n 3. Remove non-demo ERP Python code \n 4. Remove deprecated Python code

This commit is contained in:
2025-03-21 13:33:29 +00:00
parent 2ddfd8e10f
commit a6cbf9a7b7
220 changed files with 151 additions and 34140 deletions

View File

@@ -8,49 +8,40 @@ NOTE: ALL INSTRUCTIONS ARE FOR LINUX.
- Python 3.10
- npm
- Locally hosted MySQL database
- Auth0 application for project
- (Optional) Google ReCAPTCHA public and secret keys
- (Optional) Bot email account
## 1. Create Auth0 application for project
## 1. Create and populate database
1.1. Sign into your local MySQL workspace
1.2. Run script static/MySQL/0000_combined.sql
## 2. (Optional) Create Google reCAPTCHA service
NOTE: IF CONTACT US PAGE FORM FUNCTIONALITY IS REQUIRED, COMPLETE THIS STEP.
2.1. Go to the reCAPTCHA Admin Console and register your site: https://www.google.com/recaptcha/admin
2.2. Choose reCAPTCH v2
2.3. Generate and save keys for step 10
## 3. (Optional) Create bot email account
NOTE: IF CONTACT US PAGE FORM FUNCTIONALITY IS REQUIRED, COMPLETE THIS STEP.
3.1. Using your chosen email provider, create a new account for sending emails from the web server
## 4. Create and populate database
4.1. Sign into your local MySQL workspace
4.2. Run script static/MySQL/0000_combined.sql
## 5. Open the project in a new terminal window
5.1. Open a new terminal window
5.2. Navigate to the project with the following command
## 2. Open the project in a new terminal window
2.1. Open a new terminal window
2.2. Navigate to the project with the following command
- cd path/to/project/main/directory
## 6. Create virtual environment
6.1. Terminal command
## 3. Create virtual environment
3.1. Terminal command
- python3 -m venv env_demo_partsERP
## 7. Enter virtual environment
7.1. Terminal command
## 4. Enter virtual environment
4.1. Terminal command
- source env_demo_partsERP/bin/activate
## 8. Run module bundler
8.1. Terminal command
## 5. Run module bundler
5.1. Terminal command
- npm run build
## 9. Install required python packages
9.1. Terminal command
## 6. Install required python packages
6.1. Terminal command
- pip3 install -r requirements.txt
## 10. Set required environment variables
10.1. Terminal command
## 7. Set required environment variables
7.1. Terminal command
- export variable_name=variable_value
10.2. Required variables
7.2. Required variables
| Name | Purpose | Example Value |
| -------- | -------- | -------- |
| KEY_SECRET_FLASK | Private key for server encryption. | password123 |
@@ -60,7 +51,7 @@ NOTE: IF CONTACT US PAGE FORM FUNCTIONALITY IS REQUIRED, COMPLETE THIS STEP.
| SQLALCHEMY_DATABASE_URI | Database connection string for SQLAlchemy. | mysql://db_user_name:db_password@127.0.0.1:3306/db_name |
| URL_HOST | Domain (and port as necessary) that the project is hosted on. | https://127.0.0.1:5000/ |
10.3. Optional variables
7.3. Optional variables
| Name | Purpose | Example Value |
| -------- | -------- | -------- |
| MAIL_DEFAULT_SENDER | Bot email address. Required for sending internal emails following form completion on Contact Us page. | bot@partsltd.co.uk |
@@ -69,12 +60,12 @@ NOTE: IF CONTACT US PAGE FORM FUNCTIONALITY IS REQUIRED, COMPLETE THIS STEP.
| RECAPTCHA_PUBLIC_KEY | Public key for Google reCAPTCHA. Required for bot-prevention mesaures on Contact Us page form.| erDasdku8asdncuSAAS88... |
| RECAPTCHA_PRIVATE_KEY | Private key for Google reCAPTCHA. Required for bot-prevention mesaures on Contact Us page form. | erDasdku8asdncuSAAS8... |
## 11. Host project
NOTE: DO EITHER 11.1 OR 11.2.
11.1. Host for local machine
## 8. Host project
NOTE: DO EITHER 8.1 OR 8.2.
8.1. Host for local machine
- python3 -m flask run
11.2. Host for local network
8.2. Host for local network
- python3 -m flask run --host=0.0.0.0