REST APIs created using Django Rest Framework to perform CRUD operation for flight reservation.. JWT Authentication and pagination is added to the API's.
- Add, Update, Delete and Read details of a single flight.
- Read details of all flights.
- Find flight based on city of departure, city of arrival and date of departure.
- Add, Update, Delete and Read details of a single passenger.
- Read details of all passengers.
- Add and Delete a passenger's reservation on a flight.
- Read details of all reservations.
- User registration.
- User login.
- User logout.
-
Install packages
pipenv install
pipenv install PyJWT==1.7.1
-
Activate virtual environment
pipenv shell
-
Delete the file Flight-Reservation-API-using-Django-Rest-Framework/flightServices/db.sqlite3.
-
Perform migrations.
python manage.py makemigrations
python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Run the command
python manage.py runserver
Download DRF-FLIGHT-RESERVATION-API.postman_collection.json and import the file in Postman as a collection to test the APIs.