Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api detail/hans #15

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Api detail/hans #15

wants to merge 5 commits into from

Conversation

Hans97a
Copy link
Contributor

@Hans97a Hans97a commented Nov 4, 2022

작업 분류 (Category)

  • 버그 수정
  • 신규 기능
  • 문서 변경
  • 오타 수정
  • 프로젝트 구조 변경

작업 내용 (Content)

  1. 오타수정
    recipes.admin.RecipeAdmin.search_fields에서 ingredient__name 을 ingredients__name으로 수정
  2. 레시피 추천
    url 파라미터 q=unneeded_amount&n=[int]로 추천 구분/ n값이 없으면 현재 가진 재료로 요리가 가능한 레시피 추천
    recipes.views의 120번째 줄에서 filter의 값을 ingredients__in=user_ingredients로 유저가 가진 재료 pk와 겹치는 레시피 재료의 pk를 구해 이를 활용 / n값이 있으면 serialize를 달리 하기 위해 recipes.serialzers에 새로운 시리얼라이저 추가
  3. 레시피 평점
    모델 Recipe의 필드를 추가하여 구현 / recipes.serializers.RecipeSerializer의 내용을 추가하여 구현
  4. 레시피 좋아요 알림
    views에서 좋아요가 눌리면 Notification 모델 인스턴스 생성, 좋아요 취소할 경우 인스턴스 제거

기타 사항 (Etc)

레시피 추천에서 쿼리를 최대한 줄이고 싶은데 여기서 더 줄일 수 있는 방법을 모르겠습니다 :(

Merge 전 필요 작업 (Checklist before merge)

희망 리뷰 완료 일 (Expected due date)

202X.X.X. Wed
2022.11.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants