A beginner-friendly Django web application demonstrating HTML Form handling and Django ORM operations through a simple Course Management System.
π Live Demo: django-form-orm-operations.onrender.com
π Repository: fahadbinsiddique/Django-Form-ORM-Operations
This project was built to practice core Django concepts β specifically how to take user input through HTML forms and store/retrieve data using Django's powerful ORM (Object Relational Mapper). It manages three entities: Students, Courses, and Enrollments.
- β Add new Students, Courses, and Enrollments via HTML forms
- π View all records in a clean table layout
- π View individual record details
- π Filter data using ORM queries
- π οΈ Django Admin Panel support
- π¨ Responsive UI with Template Inheritance
| Technology | Usage |
|---|---|
| Python 3.14 | Backend language |
| Django 6.x | Web framework |
| SQLite | Database |
| HTML & CSS | Frontend |
| Render | Deployment platform |
my_project/
βββ my_app/
β βββ migrations/
β βββ templates/
β β βββ masters/
β β β βββ base.html
β β β βββ nav.html
β β βββ home.html
β β βββ student.html
β β βββ student_details.html
β β βββ course.html
β β βββ course_details.html
β β βββ enrollment.html
β β βββ enroll_details.html
β βββ admin.py
β βββ models.py
β βββ views.py
β βββ urls.py
βββ my_project/
β βββ settings.py
β βββ urls.py
βββ manage.py
βββ requirements.txt
βββ Procfile
βββ runtime.txt
| Field | Type |
|---|---|
| name | CharField |
| CharField | |
| phone | CharField |
| address | TextField |
| Field | Type |
|---|---|
| title | CharField |
| fee | IntegerField |
| duration | IntegerField |
| instructor_name | CharField |
| Field | Type |
|---|---|
| student_name | CharField |
| course_title | CharField |
| status | CharField |
# Create a new record
Student_Model.objects.create(name=..., email=..., phone=..., address=...)
# Get all records
Student_Model.objects.all()
# Get a single record by ID
Student_Model.objects.get(id=1)
# Filter records by condition
Student_Model.objects.filter(name="John")
Course_Model.objects.filter(fee__gt=3000) # fee greater than 3000
Enrollment_Model.objects.filter(status="Not Enrolled")- Python 3.x installed
- pip installed
# 1. Clone the repository
git clone https://github.com/fahadbinsiddique/Django-Form-ORM-Operations.git
# 2. Navigate to project folder
cd Django-Form-ORM-Operations/my_project
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run migrations
python manage.py migrate
# 5. Start the development server
python manage.py runserverThen open your browser and go to: http://127.0.0.1:8000
| URL | Description |
|---|---|
/ |
Home Page |
/student |
Student list & add form |
/course |
Course list & add form |
/enroll |
Enrollment list & add form |
/student-details/<id>/ |
Single student details |
/course-details/<id>/ |
Single course details |
/enroll-details/<id>/ |
Single enrollment details |
- How Django ORM works under the hood
- Handling GET and POST requests in views
- Template inheritance to avoid code repetition
- Deploying a Django project on Render
Fahad Bin Siddique
- GitHub: @fahadbinsiddique
- LinkedIn: @fahadbinsiddique
This project is open source and available under the MIT License.