This Flask-based web application provides a simple and intuitive interface for managing items with descriptions, tags, and associated images. It allows users to create, read, update, and delete items, as well as add and remove tags and images for each item.
- Create new items with descriptions, tags, and images
- View a list of all items
- Edit existing items (update description, add/remove tags, add/remove images)
- Delete items
- Automatic ID assignment with option for manual entry
- Image upload and management
- Tag management for easy item categorization
- Python 3.8+
- Flask 2.1.0
- SQLAlchemy (via Flask-SQLAlchemy)
- HTML/CSS
- JavaScript (for frontend interactivity)
-
Clone the repository:
git clone https://github.com/bordessoules/webapp.git cd webapp -
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 -
Set up environment variables: Create a
.envfile in the root directory and add the following:FLASK_APP=run.py FLASK_ENV=development SECRET_KEY=your_secret_key_here -
Initialize the database:
flask db upgrade -
Run the application:
flask run -
Open a web browser and navigate to
http://localhost:5000
docker-compose up --build
Open a web browser and navigate to http://localhost:5000
- Click on "Add New Item" from the homepage.
- Fill in the description, add tags (comma-separated), and upload images.
- Optionally, you can specify a custom ID or let the system auto-assign one.
- Click "Add Item" to save.
- From the item list, click on "Edit" next to the item you want to modify.
- Update the description, add/remove tags, or add/remove images as needed.
- Click "Update Item" to save changes.
- From the item list, click on "Delete" next to the item you want to remove.
- Confirm the deletion when prompted.
flask-item-management/
│
├── app/
│ ├── __init__.py
│ ├── models.py
│ ├── routes.py
│ ├── helpers.py
│ └── templates/
│ ├── base.html
│ ├── index.html
│ ├── add.html
│ └── edit.html
│
├── .env
├── .gitignore
├── requirements.txt
├── app.py
└── README.md
Contributions are welcome! Please follow these steps to contribute: Fork the repository Create a new branch (git checkout -b feature-branch) Commit your changes (git commit -am 'Add new feature') Push to the branch (git push origin feature-branch) Create a new Pull Request
This project is licensed under Apache License - see the LICENSE file for details or at 'https://www.apache.org/licenses/LICENSE-2.0'.