A beginner-friendly project to help you learn and understand the fundamentals of Django REST Framework (DRF) — covering everything from basic APIs to serializers, views, authentication, and more.
- 🔹 Django REST Framework setup & configuration
- 🔹 API views:
APIView
,ViewSet
,GenericAPIView
- 🔹 Serializers & ModelSerializers
- 🔹 CRUD operations (Create, Read, Update, Delete)
- 🔹 Pagination & filtering
🔗 Live URL : Click Here
Follow these steps to get the project up and running locally:
git clone https://github.com/Dhananjay66/DRF-Project.git
cd DRF-Project
python -m venv venv
# For Linux/Mac
source venv/bin/activate
# For Windows
venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
🎉 You're all set! Open your browser and go to http://127.0.0.1:8000/
to see it live.
Method | Endpoint | Description |
---|---|---|
GET | /api/v1/employees/ |
List all employees |
POST | /api/v1/employees/ |
Create a new employee |
GET | /api/v1/employees/{id}/ |
Retrieve a single employee |
PUT | /api/v1/employees/{id}/ |
Update an existing employee |
DELETE | /api/v1/employees/{id}/ |
Delete an employee |
🔐 Authentication required for certain routes (if implemented).
python manage.py test
│
├── manage.py
├── db.sqlite3
├── requirements.txt # List of all Python dependencies
│
├── Django_Rest_Main/ # Main project configuration
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
│
├── api/ # Shared logic or general APIs
│ ├── admin.py
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── urls.py
│ └── migrations/
│
├── students/ # App for managing student data
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ ├── admin.py
│ └── migrations/
│
└── employees/ # App for managing employee data
├── models.py
├── views.py
├── admin.py
└── migrations/
# Create superuser for admin access
python manage.py createsuperuser
# Create migrations
python manage.py makemigrations
python manage.py migrate
We love contributions from the community!
- 🐞 Found a bug? Open an issue.
- 🚀 Want to add a new feature? Fork the repo and submit a PR.
- 📄 Make sure to update documentation if needed.
- ✅ Please test your code before submitting.
Thank you for making this project better! 💖
This project is licensed under the MIT License — see the LICENSE file for details.
For any query or collaboration:
📧 [pratapsinghd665@gmail.com]