我有一个项目模型:
class Project(models.Model):
category = models.ManyToManyField(ProjectCategory)
designer = models.ForeignKey(User)
name = models.CharField(max_length=255)
description = models.TextField()
image1 = ImageField(upload_to='.../designs/')
image2 = ImageField(upload_to='.../designs/')
image3 = ImageField(upload_to='.../designs/')
我想将图像分开到另一个模型:
class ProjectImages(models.Model):
project = models.ForeignKey(Project)
image1 = ImageField(upload_to='.../designs/')
image2 = ImageField(upload_to='.../designs/')
image3 = ImageField(upload_to='.../designs/')
这是一个正确的模型吗?或者将项目图像与项目区分开来的正确方法是什么?