[MySQL, Django] 관계 설정하기 (일대일, 일대다, 다대다)
1. OneToOne OneToOneField를 사용했을 때 class BodyProfile(models.Model): height_cm = models.DecimalField(max_digits=5, decimal_places=2) weight_kg = models.DecimalField(max_digits=5, decimal_places=2) feet_mm = models.DecimalField(max_digits=5, decimal_places=2) class Meta: db_table = 'body_profiles' class User(models.Model): email = models.EmailField(max_length=100) password = models.CharField(max_le..
프레임워크+라이브러리/Django
2021. 3. 30. 18:04