From b2eaa3be85b30732c4e6c083c6f0413c02dbaec4 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 3 Jan 2019 01:11:23 +0100 Subject: UPS2018: ajout du champ celcat_id Les cours dans celcat ont un champ id. Ce changement permet de le stocker dans la base de données (sous la forme d’un entier) et de l’afficher dans l’interface d’administration. Pour l’instant, on ne sait pas si cette valeur est unique ou non. Il n’y a donc pas de contraintes sur ce champ pour le moment. Signed-off-by: Alban Gruin --- models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'models.py') diff --git a/models.py b/models.py index c8e7b3d..b1a6a1e 100644 --- a/models.py +++ b/models.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Alban Gruin +# Copyright (C) 2017-2019 Alban Gruin # # celcatsanitizer is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published @@ -246,6 +246,8 @@ class Course(models.Model): last_update = models.DateTimeField(verbose_name="dernière mise à jour", default=timezone.now) + celcat_id = models.IntegerField(verbose_name="ID Celcat", null=True) + def __str__(self): return self.name -- cgit v1.2.1