Momentum logo
Team 14 Classroom

🐻 Django REST Framework 🐻

Posted on Sep 13th, 2022

πŸ—“οΈ Today’s Topics

Today we dive into Django REST Framework. 🀿

🎯 Project: Choose Your Own Adventure πŸͺ 🐫

Choose one of the following options.

The application must be deployed to Heroku, whichever option you choose. πŸš€

πŸͺ OPTION ONE: Add an API to Habit Tracker

Add a new app to your existing Habit Tracker project and call it api. Your app should provide CRUD endpoints that return JSON responses.

By Friday afternoon, you should be able to do almost all of the following via the API – that is, by making requests using Insomnia.

  • get a list habits
  • create a new habit
  • get data about a specific habit that includes its associated daily records, if any
  • create a record for a specific habit for today (stretch: create a record for any date)

By Monday, you should be able to complete all necessary CRUD tasks through the API:

  • list habits
  • create a new habit
  • update a habit
  • delete a habit
  • get data about a specific habit that includes its associated daily records, if any
  • create a record for a habit for today (stretch: create a record for any date)
  • update a record for a habit
  • delete a record from a habit

Write up a list of endpoints you think you will need before you start doing this. Don’t make endpoints you don’t need.

You should develop and test your endpoints using Insomnia. (You can also use the browsable API that DRF gives you in the browser, but you should be comfortable using Insomnia.)

🐫 OPTION TWO: Django Library API

Link to assignment invitation.

Create a new API-only application that lets users keep track of books they are reading, want to read, or have read, and take private or public notes on books. More details about project requirements are included in the assignment README.

You should not make forms or templates for this app, but you will need models, urls, views, and serializers. You should use class-based views and return JSON responses.


πŸ“– Read | πŸ“Ί Watch | 🎧 Listen

πŸ”– Resources

Blog articles that go with Lacey Williams Henschel’s talk

πŸ‘Ύ Code & Notes

Back to home