-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(quiz): create QuizRecord #352
Conversation
赶着写就没删分支接着写了),merge那一步有点蠢了,冲突手动解决了 |
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.
QuizRecord 应该可以能独立使用?
@@ -60,3 +60,19 @@ class PaperRecord(models.Model): | |||
verbose_name="试卷", | |||
) | |||
id = models.CharField(max_length=20, verbose_name="ID", primary_key=True) | |||
|
|||
|
|||
class QuizRecord(models.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.
wu 你的 QuizRecord 要依附于 PaperRecord 吗? 我本来以为是相关但独立的两个东西?
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.
所以我设想中应该还有contributor、time之类的字段
quiz = models.ForeignKey( | ||
Quiz, on_delete=models.CASCADE, related_name="quiz", verbose_name="测试题" | ||
) | ||
paper = models.ForeignKey( |
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.
这里应该是PaperRecord吧,而且是个可选项
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.
因为我认为不在卷子里也可能可以答题
"quiz": quiz_all(record.quiz), | ||
"answer": record.answer, | ||
"correctness": record.correctness, | ||
"paper": None if record.paper is None else paper_simple(record.paper), |
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.
总担心这里的返回会嵌套) 但是也都还行吧,大不了到时候再改
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.
一点小细节(
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.
文件命名错误
hinghwa-dict-backend/quiz/models.py
Outdated
PaperRecord, | ||
on_delete=models.CASCADE, | ||
related_name="quiz_paper", | ||
verbose_name="所在试卷", |
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.
所在答卷记录
改完了 |
No description provided.