diff donations/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 e14f54f16dbc
children
line wrap: on
line diff
--- a/donations/models.py	Sat Jan 04 21:34:31 2025 -0600
+++ b/donations/models.py	Wed Jan 22 17:58:16 2025 -0600
@@ -95,7 +95,8 @@
 class Donation(models.Model):
     """Model to represent a donation to the website."""
 
-    user = models.ForeignKey(User, null=True, blank=True)
+    user = models.ForeignKey(User, null=True, blank=True,
+                             on_delete=models.CASCADE)
     is_anonymous = models.BooleanField(default=False)
     test_ipn = models.BooleanField(default=False, verbose_name="Test IPN")
     txn_id = models.CharField(max_length=20, verbose_name="Txn ID")