diff 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
line wrap: on
line diff
--- a/banners/models.py	Sat Jan 04 21:34:31 2025 -0600
+++ b/banners/models.py	Wed Jan 22 17:58:16 2025 -0600
@@ -42,7 +42,7 @@
     A model to represent a banner.
 
     """
-    campaign = models.ForeignKey(Campaign)
+    campaign = models.ForeignKey(Campaign, on_delete=models.CASCADE)
     image = models.ImageField(upload_to=banner_upload_to)
     description = models.CharField(max_length=128)
     creation_date = models.DateTimeField(blank=True)