This project is a web-based form that allows users to input data about items in inventory and save that data to a CSV file. The "Supplier" field in the form will be populated by reading a JSON file that contains the list of suppliers. The project utilizes HTML, CSS, JavaScript, Python, and Flask.
- Web form for inventory data entry
- Dynamic "Supplier" field populated from a JSON file
- Data saving functionality to a CSV file
- Backend support using Python and Flask
- HTML
- CSS
- JavaScript
- Python
- Flask
-
Clone the repository:
git clone https://github.com/your-username/inventory-form.git cd inventory-form -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
flask run
-
Open your browser and navigate to:
http://127.0.0.1:5000 -
Fill in the inventory form and submit:
- Item Name
- Quantity
- Price
- Supplier (populated from JSON file)
-
The data will be saved to a CSV file in the project directory.
## Project Structure
inventory-form/ ├── static/ │ ├── css/ │ │ └── styles.css │ └── js/ │ └── scripts.js ├── templates/ │ └── index.html ├── data/ │ └── suppliers.json ├── app.py ├── requirements.txt └── README.md
The suppliers.json file should be structured as follows:
{
"suppliers": [
"Supplier A",
"Supplier B",
"Supplier C"
]
}