A simple student management system built with Flask and SQLAlchemy that allows you to perform CRUD (Create, Read, Update, Delete) operations on student records.
- View all student records
- Add new student records
- Edit existing student information
- Delete student records
- SQLite database integration
- Flash messages for operation feedback
- Python 3.x
- Flask
- Flask-SQLAlchemy
- Clone the repository:
git clone https://github.com/adavidoaiei/Flask-Python.git
cd Flask-Python
- Install the required dependencies:
pip install flask flask-sqlalchemy
- Run the application:
python app.py
The application will be available at http://localhost:5000
The application uses SQLite database with the following student model:
- student_id (Primary Key)
- name (String)
- city (String)
- addr (Address - String)
- pin (String)
GET /
- Display all student recordsGET /new
- Display the form to add a new studentPOST /new
- Add a new student recordGET /edit/<id>
- Display the form to edit a student's informationPOST /edit/<id>
- Update a student's informationGET /delete/<id>
- Delete a student record
- View all students by accessing the home page
- Click "Add New Student" to create a new student record
- Fill in all required fields (name, city, address, and pin)
- Use the edit button to modify existing records
- Use the delete button to remove student records
The application runs in debug mode by default, making it easier to develop and test new features. The SQLite database is automatically created in the instance
folder when you first run the application.
Feel free to fork this repository and submit pull requests to contribute to this project.
This project is open source and available under the MIT License.