diff gcalendar/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 f0ac48aa8c64
children
line wrap: on
line diff
--- a/gcalendar/models.py	Sat Jan 04 21:34:31 2025 -0600
+++ b/gcalendar/models.py	Wed Jan 22 17:58:16 2025 -0600
@@ -41,7 +41,7 @@
         (ON_CAL, 'On Calendar'),
     )
 
-    user = models.ForeignKey(User)
+    user = models.ForeignKey(User, on_delete=models.CASCADE)
     what = models.CharField(max_length=255)
     start_date = models.DateField()
     start_time = models.TimeField(null=True, blank=True)