- 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
rest_task_08's Introduction
rest_task_08's People
Forkers
nbalissa sfares85 falkhuzam aishans mon5tery salqanaei furionq8 zoremulla moeabdal leyvai fayalzouman alialduaij falhajji azizabuabbas talmuha nbalrifai helaahma dawoodalo yalothman97 samirahisham naseraldeen ahmadqmairah alyaaalostad bashayernouri someonesmith sweerna1 wadha08 nbassem kurohage ferasaldweesh halkazemi93 nada96k farahalkhaldi nancyelsh s-bader saraalkhawari feyfey27 yousefbnk manaleee bnmre81 mrbuhamad lubeina sasa17 shahzadkashif abdelmajeed-shaheen alhusamia osamamks bachira95 sarataiseer ahmad-saadeh ahmedalsalman essamabuissa ghada6336 nerobeats sparksys98 olgahh hammam1311 tala-agha annaguzel ayhamsamara codedhq malzaid0 shahdallemie0 atheen alialdobyan ghad1ee2r3 jawish-a hebaflemban khalidalmuhawis mmrg98 raghaadmr msk6 hanodims educationninja kalmansour engxli fatemah-almRecommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.