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

models.py and documents.py expand #56

Merged
merged 13 commits into from
Sep 8, 2023
Merged

Conversation

zx32829601
Copy link
Contributor

#todolist
recordListener.py:call the Pet's info by ID
recordListener裡面可能需要一個輸入識別寵物的資訊

#todolist
  recordListener.py:call the Pet's info by ID
#todolist
  recordListener.py:call the Pet's info by ID
Copy link
Owner

@fan9704 fan9704 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request to Change

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊可以參考目前 Master branch 的寫法,先製作 Serializer(DTO 的概念),就不需要自行定義輸入資料

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這些 low moderate high 已經說明在 Model 裡面 Django Model 是否會對於這些不相對應的值進行處理?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a problem

api/views/petViews.py Outdated Show resolved Hide resolved
api/documents.py Outdated
@@ -57,6 +57,13 @@ class PetES(Document):
})
type = fields.TextField(attr='type_to_string')

# 後來model新增的一些欄位
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡就不需要寫入欄位
僅會放入需要關聯的欄位

api/management/commands/recordListener.py Outdated Show resolved Hide resolved
return Response(data=petDict, status=status.HTTP_200_OK)


def petResponseConverter(pet: models.Pet):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要這個 改用 Serializer 處理

@fan9704
Copy link
Owner

fan9704 commented Aug 5, 2023

image
測試結果未通過

@zx32829601 zx32829601 requested a review from fan9704 September 2, 2023 15:42
Copy link
Owner

@fan9704 fan9704 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.example Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Delete Example File @zx32829601

Copy link
Owner

@fan9704 fan9704 Sep 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已經幫我把 RecordListener.py 刪掉
.env.example 檔案復原

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建議去直接 Raise Exception (Exception 太泛用對於程式來說太過於籠統) 後續要製作處理 Exception 的 Handler 會成為技術負債

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個我改就好 只是跟你說一下

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PetSerializer 對於 Create Method 進行 Override 是否也會需要對 Pet Model 的 create() 進行 Override

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這些 low moderate high 已經說明在 Model 裡面 Django Model 是否會對於這些不相對應的值進行處理?

.gitignore Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原本是對的 這個要改回來
我是指不要刪掉 .env.example 這個檔案

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a problem

.env.example Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把她叫回來

@fan9704 fan9704 merged commit 948a5af into fan9704:master Sep 8, 2023
1 check failed
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