Skip to content
Sachinkandel78Public

About

Student Management System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

SMS — Student Management System

A simple Student Management System built with Django, supporting full CRUD (Create, Read, Update, Delete) operations on student records through a web interface.

✨ Features

  • View a list of all students on the home page
  • Add a new student (name, roll number, age, class)
  • Update an existing student's details
  • Delete a student record
  • Django admin panel support for managing data directly

🛠️ Tech Stack

  • Backend: Python, Django
  • Database: SQLite (db.sqlite3)
  • Frontend: Django templates (HTML)

📂 Project Structure

SMS-main/
├── Student_Mgmt_sytem/     # Django project (settings, urls, wsgi/asgi)
│   ├── settings.py
│   ├── urls.py
│   ├── wsgi.py
│   └── asgi.py
├── home/                   # Main app
│   ├── models.py           # Student model
│   ├── views.py            # index, create, update, delete views
│   ├── admin.py
│   └── migrations/
├── templates/
│   ├── base.html
│   ├── index.html          # Student list
│   ├── create.html         # Add student form
│   ├── update.html         # Edit student form
│   ├── detail.html
│   └── includes/navbar.html
├── db.sqlite3
└── manage.py

🧩 Data Model

The Student model (home/models.py) includes:

Field Type
name CharField
age PositiveSmallIntegerField
Class CharField
roll IntegerField

🔗 Routes

URL View Description
/ index List all students
/create/ create Add a new student
/update/<id>/ update Edit a student's details
/delete/<id>/ delete Delete a student
/admin/ Django admin Manage data via the built-in admin panel

🚀 Getting Started

Prerequisites

  • Python 3.x
  • pip

Installation

# Clone the repository
git clone https://github.com/<your-username>/SMS.git
cd SMS

# (Recommended) create a virtual environment
python -m venv venv
source venv/bin/activate   # On Windows: venv\Scripts\activate

# Install Django
pip install django

# Apply migrations
python manage.py migrate

# (Optional) create an admin user
python manage.py createsuperuser

# Run the development server
python manage.py runserver

Then open http://127.0.0.1:8000/ in your browser.

📌 Notes

  • The included db.sqlite3 contains any data from development/testing — delete it and re-run python manage.py migrate for a clean database.
  • The create view checks for a visited cookie (set on the home page) before allowing new students to be added — visit the home page (/) first if you land directly on /create/.
  • __pycache__ folders are compiled Python bytecode and aren't required to run the project; they're safe to remove and are typically excluded via .gitignore.

🔮 Possible Improvements

  • Add form validation and error handling
  • Add search/filter functionality for the student list
  • Add authentication so only logged-in users can manage records
  • Replace raw POST.get() calls with Django Forms/ModelForms

About

Student Management System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages