Skip to content

A simple Flask web application to manage student records with MongoDB as the backend database. Users can add, view, update, and delete student details.

License

Notifications You must be signed in to change notification settings

mohanDevOps-arch/flask_Practice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Registration System

A simple Flask web application to manage student records with MongoDB as the backend database. Users can add, view, update, and delete student details.


Features

  • List all students on the home page
  • Add a new student
  • Update existing student details
  • Delete a student with confirmation
  • Simple and responsive UI using Bootstrap

Tech Stack

  • Backend: Python, Flask
  • Database: MongoDB (via Flask-PyMongo)
  • Frontend: HTML, Jinja2 templates, Bootstrap 5
  • Environment Variables: Managed via .env file

Setup Instructions

1. Clone the repository

git clone <your-repo-url>
cd <repo-folder>

2. Create and activate a virtual environment

python -m venv venv
# Activate venv
# Windows:
venv\Scripts\activate
# Linux / Mac:
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

requirements.txt example:

Flask
Flask-PyMongo
python-dotenv
bson

4. Configure environment variables

Create a .env file in the project root:

MONGO_URI=<your-mongodb-connection-string>
SECRET_KEY=<your-secret-key>

5. Run the application

python app.py

Open your browser at: http://localhost:8000


Project Structure

project/
│
├── templates/
│   ├── base.html
│   ├── index.html
│   ├── add_student.html
│   ├── update_student.html
│
├── app.py
├── requirements.txt
└── .env

Screenshots

Home Page Lists all students with Edit/Delete buttons.

  • image

Add Student Form to add a new student.

  • image

Update Student Form pre-filled with student details.

  • image

Notes

  • Make sure MongoDB is running and accessible via the URI in .env
  • Delete action includes a confirmation page to prevent accidental deletion
  • Uses ObjectId from bson to work with MongoDB document IDs

License

MIT License


About

A simple Flask web application to manage student records with MongoDB as the backend database. Users can add, view, update, and delete student details.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.8%
  • HTML 39.6%
  • Shell 7.6%