-
Notifications
You must be signed in to change notification settings - Fork 0
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
ManyToManyField의 사용 건. #1
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ManyToManyField의 사용 건.
현재 mycourse app 의 model이
class Recommend_Course(models.Model):
Course = models.ForeignKey(Course_Evaluation)
CreatedID = models.ForeignKey(Profile)
class Like_Course(models.Model):
Course = models.ForeignKey(Lecture)
CreatedID = models.ForeignKey(Profile)
이와 같이 되어있다. 그런데 Django의 특성상 ManyToManyField 를 사용하면 model 하나를 더 만들지 않아도 되고, 더 적은 조건으로 원하는 데이터를 조작할 수 있다.
login_profile table에서 ManyToManyField로 설계하도록 수정하는 것이 좋을 것 같다.
The text was updated successfully, but these errors were encountered: