class Photo models Model ph1 models ImageField upload_to gallery ph2 m

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
class Photo(models.Model):
ph1 = models.ImageField(upload_to='gallery')
ph2 = models.ImageField(upload_to='gallery')
ph3 = models.ImageField(upload_to='gallery')
ph4 = models.ImageField(upload_to='gallery')
ph5 = models.ImageField(upload_to='gallery')
class Gallery(models.Model):
name = models.CharField(max_length = 40)
discription = models.TextField()
photo = models.ForeignKey('Photo')