How priyanka-ch-dev/django-rest-crud-mixins-employee-student-product works
This Django REST Framework project exposes CRUD APIs for employees, students, and products, each using a distinct DRF approach. Requests enter through the project URL configuration and are routed to app endpoints; views perform CRUD using each app’s model and serializer. Employee handling is manual, Student handling composes generic views with mixins, and Product handling uses predefined generic views. The excerpts do not show project-level URL wiring or database configuration, so those relationships are documented but not asserted as source-level calls.
Main entry points: p1/urls.py Project routes · student/urls.py Student routes · product/urls.py Product routes · views.py Manual CRUD
Components 18
API routing
- Project routes
p1/urls.py - Employee routes
emp/urls.py - Student routes
student/urls.py - Product routes
product/urls.py
Employee API
- Manual CRUD
emp/views.py - Employee serializer
emp/serializer.py - Employee record
emp/models.py
Student API
- List and create
student/views.py - Retrieve and modify
student/views.py - Student serializer
student/serializers.py - Student record
student/models.py
Product API
- List and create
product/views.py - Retrieve and modify
product/views.py - Product serializer
product/serializers.py - Product record
product/models.py
Other components
- API client
- Browsable API
- Postman
Connections 24
- API client → Project routes: sends request
- Project routes → Employee routes: routes to
README.md - Project routes → Student routes: routes to
README.md - Project routes → Product routes: routes to
README.md - Employee routes → Manual CRUD: dispatches
emp/urls.py - Student routes → List and create: dispatches
student/urls.py - Student routes → Retrieve and modify: dispatches
student/urls.py - Product routes → List and create: dispatches
product/urls.py - Product routes → Retrieve and modify: dispatches
product/urls.py - Manual CRUD → Employee serializer: validates data
emp/views.py - Employee serializer → Employee record: serializes
emp/serializer.py - Manual CRUD → Employee record: queries and saves
emp/views.py - List and create → Student serializer: uses serializer
student/views.py - Retrieve and modify → Student serializer: uses serializer
student/views.py - Student serializer → Student record: serializes
student/serializers.py - List and create → Student record: queries
student/views.py - Retrieve and modify → Student record: queries
student/views.py - List and create → Product serializer: uses serializer
product/views.py - Retrieve and modify → Product serializer: uses serializer
product/views.py - Product serializer → Product record: serializes
product/serializers.py - List and create → Product record: queries
product/views.py - Retrieve and modify → Product record: queries
product/views.py - Browsable API → API client: serves interface
README.md - Postman → Project routes: sends requests
README.md