This repository contains a simple CRUD (Create, Read, Update, Delete) application built using Python Django framework, with PostgreSQL as the database backend. The application provides endpoints that can be accessed via HTTP requests, demonstrated using Postman. I have taken help from PythonHacks and CURD app build repository for developing this project.
- CRUD functionality implemented for managing data.
- Utilizes PostgreSQL as the database for data storage.
- API endpoints tested using Postman.
-
Clone the Repository:
git clone https://github.com/RiyoCafe/simple-car-curd-application-django.git
-
Set Up PostgreSQL Database:
- Create a PostgreSQL database.
- Update the database settings in
settings.py
with your database credentials.
-
Run Migrations:
python manage.py migrate
-
Start the Development Server:
python manage.py runserver
-
Access API Endpoints:
- Use Postman or any HTTP client to interact with the API endpoints.
- Create:
POST /api/cars/add/
- Read:
GET /api/cars/
(Retrieve all resources) - Read:
GET /api/cars/{id}/
(Retrieve a specific resource) - Update:
PATCH /api/cars/update/{id}/
(Update a resource) - Delete:
DELETE /api/cars/delete/{id}/
(Delete a resource)