Momentum logo
Team 13 Classroom

๐Ÿป Search & Automatic Deploys ๐Ÿป

Posted on Aug 1st, 2022

Todayโ€™s Topics

  • Implementing search, including Postgres full-text search

๐ŸŽฏ Project due on Thursday afternoon

Please include a README in your project repo. The README should be:

  • written in Markdown
  • include a link to your production application
  • shave instructions for getting your application running locally, so that any developer could pull it down and run it. If your setup makes any assumptions about the environment (e.g., you have Python 3.10.2 installed locally), you should state them in the README.

Your README should include documentation for your APIโ€™s available endpoints.

๐Ÿ‘‰ If your project meets minimum requirements today, HUZZAH! That is awesome. You should be working on at least one additional or spicy feature.

๐Ÿ‘‰ If your project does not yet meet minimum requirements, you should aim for meeting them by the end of the day Wednesday.

Note

Depending on how youโ€™ve constructed your API, you might have separate endpoints for all of the below, or you might have fewer endpoints (for instance, if you nested answers in the question detail endpoint, like questions/4/answers). What matters is that you have endpoints that your front-end team can use to perform all the necessary actions they need and that are documented in your README.

Requirements for QuestionBox, Back End

โš ๏ธ Be sure to test that you have implemented permissions-checking correctly for these endpoints. For example, your API should not allow a user who is not the question-asker to mark an answer as accepted.

  • token login, logout, and register (i.e., create a new user)
  • list all questions
  • list answers to a specific question
  • show details about a specific question
  • create a question if logged in
  • create an answer to a question (if you are not the question owner) if logged in
  • mark an answer as โ€œacceptedโ€ (if you are the question owner)
  • list of own questions for an authenticated user
  • list of own answers for an authenticated user
  • star/favorite questions or answers
  • unstar/unfavorite questions or answers
  • search questions (possibly both questions and answers)
  • A README with endpoints documented

Requirements for Social Cards, Back End

โš ๏ธ Be sure to test that you have implemented permissions-checking correctly for these endpoints. For example, your API should not allow a user who is not the creator of a card to update a card.

  • token login, logout, and register (i.e., create a new user)
  • list all cards
  • list all cards youโ€™ve created (you, the logged in user)
  • list all cards that a user you follow has created
  • show details of one card
  • create a new card
  • update a card
  • delete a card
  • follow another user
  • unfollow another user
  • list all the users you follow
  • A README with endpoints documented

๐Ÿ“– Read | ๐Ÿ“บ Watch | ๐ŸŽง Listen

๐Ÿ”– Resources

@action decorator in ViewSets

๐Ÿฆ‰ Code & Notes

  • DRF Library API
  • Notes on Django Queries These are the same notes you may have seen at the beginning of the Phase. Iโ€™m including them here for easy reference, as they show examples of queries and filters that might come in handy for search endpoints.

Back to home