aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2017-09-08 20:50:07 +0200
committerAlban Gruin2017-09-08 20:50:07 +0200
commit82349adf8da273ce37cd7293d30798e17e8fdc71 (patch)
tree35ffb41b79fdfb3211199ac7aaf31b44c9c8d403
parent400b3dc382ff5f0b279250b4952569206e42d7fd (diff)
Ajout du oncascade au modèle timetables
-rw-r--r--models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models.py b/models.py
index 109b327..7609e7b 100644
--- a/models.py
+++ b/models.py
@@ -38,7 +38,7 @@ class Year(models.Model):
class Timetable(models.Model):
- year = models.ForeignKey(Year, verbose_name="année")
+ year = models.ForeignKey(Year, on_delete=models.CASCADE, verbose_name="année")
name = models.CharField(max_length=64, verbose_name="nom")
url = models.URLField(max_length=255, verbose_name="URL")
slug = models.SlugField(max_length=64, default="")