- Setup a virtual environment.
- Fork the repository for Django REST Task 8 in JoinCODED’s Github and Clone it.
- Install the packages from the requirements file.
- A new model
Profile
have been added with a viewProfileDetails
that retrieves the profile of the logged in user. Modify theProfileSerializer
so that it return the following:- Show the following information about the
User
:first_name
last_name
miles
past_bookings
: A list ofBooking
objects belonging to the logged in user that have passed.- Serialize them using the
BookingSerializer
.
- Serialize them using the
tier
: specify which tier the user have reached according to his miles.- 0 - 9999 :
Blue
- 10,000 - 59,999 :
Silver
- 60,000 - 99,999 :
Gold
- 100,000 ~ :
Platinum
- 0 - 9999 :
- Show the following information about the
- Modify the
BookingDetailsSerializer
so that it returns the following:total
: which is the total cost of the flight for all passengers.flight
: Use theFlightSerializer
to display the flight info.date
.id
.passengers
.
- Modify the
BookingSerializer
so that it returns the following:flight
: Show the destination instead of the flight id using SlugRelatedField.date
id
- Push your code
-
Notifications
You must be signed in to change notification settings - Fork 80
JoinCODED/REST_task_08
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published