comparison banners/models.py @ 1206:02181fa5ac9d modernize tip

Update to Django 1.9.
author Brian Neal <bgneal@gmail.com>
date Wed, 22 Jan 2025 17:58:16 -0600
parents ee87ea74d46b
children
comparison
equal deleted inserted replaced
1205:510ef3cbf3e6 1206:02181fa5ac9d
40 class Banner(models.Model): 40 class Banner(models.Model):
41 """ 41 """
42 A model to represent a banner. 42 A model to represent a banner.
43 43
44 """ 44 """
45 campaign = models.ForeignKey(Campaign) 45 campaign = models.ForeignKey(Campaign, on_delete=models.CASCADE)
46 image = models.ImageField(upload_to=banner_upload_to) 46 image = models.ImageField(upload_to=banner_upload_to)
47 description = models.CharField(max_length=128) 47 description = models.CharField(max_length=128)
48 creation_date = models.DateTimeField(blank=True) 48 creation_date = models.DateTimeField(blank=True)
49 49
50 def __unicode__(self): 50 def __unicode__(self):