-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
#todolist recordListener.py:call the Pet's info by ID
#todolist recordListener.py:call the Pet's info by ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request to Change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這邊可以參考目前 Master branch 的寫法,先製作 Serializer(DTO 的概念),就不需要自行定義輸入資料
There was a problem hiding this comment.
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 是否會對於這些不相對應的值進行處理?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a problem
api/documents.py
Outdated
@@ -57,6 +57,13 @@ class PetES(Document): | |||
}) | |||
type = fields.TextField(attr='type_to_string') | |||
|
|||
# 後來model新增的一些欄位 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這裡就不需要寫入欄位
僅會放入需要關聯的欄位
api/views/petViews.py
Outdated
return Response(data=petDict, status=status.HTTP_200_OK) | ||
|
||
|
||
def petResponseConverter(pet: models.Pet): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要這個 改用 Serializer 處理
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC: @zx32829601
.env.example
Outdated
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已經幫我把 RecordListener.py 刪掉
.env.example 檔案復原
There was a problem hiding this comment.
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 會成為技術負債
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這個我改就好 只是跟你說一下
api/serializers.py
Outdated
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原本是對的 這個要改回來
我是指不要刪掉 .env.example 這個檔案
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把她叫回來
#todolist
recordListener.py:call the Pet's info by ID
recordListener裡面可能需要一個輸入識別寵物的資訊