This is a simple Flask application that demonstrates basic CRUD (Create, Read, Update, Delete) operations using a MySQL database. It allows you to manage student records.
Before running this application, make sure you have the following installed:
- Python (version 3.6 or higher)
- MySQL (you can use XAMPP, WAMP, or any other MySQL server)
-
Clone this repository to your local machine:
git clone https://github.com/Halip26/student-list-crud.git
-
Navigate to the project directory:
cd flask-crud-app
-
Install the required Python packages (Flask and Flask-MySQLdb):
pip install flask flask-mysqldb
-
Configure your MySQL database:
- Create a new database (e.g.,
crud_flask
). - Update the
app.config
section inapp.py
with your MySQL credentials (host, user, password, and database name).
- Create a new database (e.g.,
-
Run the application:
python app.py
-
Open your web browser and go to http://localhost:5000/ to access the application.
- The home page (
/
) displays a list of all students. - You can add a new student by clicking the "Add Student" button.
- To update a student's information, click the "Edit" button next to their name.
- To delete a student, click the "Delete" button next to their name.
Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and improvements are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.