class ProjectImages(models.Model):
    project=models.ForeignKey('Project', related_name='projectimage', default=None, on_delete=models.CASCADE)
    title=models.CharField(max_length=100, null=True, blank=True)
    project_image=models.ImageField(upload_to='project_images/%Y/%m/%d')
    created_at=models.DateTimeField(auto_now_add=True)
    updated_at=models.DateTimeField(auto_now=True)

LEAVE A REPLY

Please enter your comment!
Please enter your name here