GithubHelp home page GithubHelp logo

rest_task_08's Introduction

  1. Setup a virtual environment.
  2. Fork the repository for Django REST Task 8 in JoinCODED’s Github and Clone it.
  3. Install the packages from the requirements file.
  4. A new model Profile have been added with a view ProfileDetails that retrieves the profile of the logged in user. Modify the ProfileSerializer so that it return the following:
    • Show the following information about the User:
      • first_name
      • last_name
    • miles
    • past_bookings: A list of Booking objects belonging to the logged in user that have passed.
      • Serialize them using the BookingSerializer.
    • 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
  5. Modify the BookingDetailsSerializer so that it returns the following:
    • total: which is the total cost of the flight for all passengers.
    • flight: Use the FlightSerializer to display the flight info.
    • date.
    • id.
    • passengers.
  6. Modify the BookingSerializer so that it returns the following:
    • flight: Show the destination instead of the flight id using SlugRelatedField.
    • date
    • id
  7. Push your code

rest_task_08's People

Contributors

darthhamza avatar dependabot[bot] avatar lailalelouch avatar themshary avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.