Skip to content

sajjadali-fullstack/django-orm-deepdive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›๏ธ Premium Prisoner Management System (Django ORM Mastery)

A highly polished, modern web dashboard built with Django and Bootstrap 5. This repository serves as a practical blueprint for mastering Django Object-Relational Mapping (ORM) operations and features an automated database populator tool using the Faker library.


๐Ÿ“ธ Interface Preview

Premium Dashboard Interface


โšก Key Features

  • Automated Data Seeding: Includes a robust standalone populate.py script powered by Faker to inject thousands of mock prisoner profiles instantly.
  • Django ORM Mastery: Demonstrates advanced database queries including string lookups (__icontains), sorting (order_by), and filtering.
  • SaaS-inspired UI: A clean dashboard designed with Google's Inter font, soft custom status badges (Serving vs Released), and fully responsive layouts.

โš™๏ธ Core Django ORM Features Explored

Inside views.py, this project demonstrates various ways to query database records dynamically using Django's powerful ORM layer:

  • Fetch All Records: Prisoner.objects.all()
  • Exact Filtering: Prisoner.objects.filter(first_name='Kavya')
  • Case-Insensitive Search: Prisoner.objects.filter(crimes__icontains='murder')
  • Ascending Order: Prisoner.objects.order_by('id')
  • Descending Order: Prisoner.objects.order_by('-id')

๐Ÿ“Š Database Seeding Automation (populate.py)

No need to enter records manually via the Django Admin panel. The built-in automation script bypasses the standard server and speaks directly with the Django ORM to generate massive mock datasets safely using get_or_create.

How to seed your database:

In Terminal

python populate.py

Interaction Example:

Enter number of Prisoner : 50 50 Record inserted successfully!

About

A sleek, premium Prisoner Management System dashboard built to master Django ORM queries (Filtering, Sorting, and Context Lookups) paired with a modern Bootstrap 5 UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors