]> git.parisson.com Git - teleforma.git/commitdiff
Add Period.parent
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 24 Apr 2017 12:50:10 +0000 (14:50 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 24 Apr 2017 12:50:10 +0000 (14:50 +0200)
teleforma/models/core.py

index d6169320ab142834b132efa70511e4bf8811277e..1d15dca2f633217962f36ac32dbc8391c21aed99 100644 (file)
@@ -128,6 +128,7 @@ class Period(Model):
 
     name            = models.CharField(_('name'), max_length=255)
     description     = models.CharField(_('description'), max_length=255, blank=True)
+    parent = models.ForeignKey('Period', related_name='children', verbose_name=_('parent'), blank=True, null=True)
     date_begin      = models.DateField(_('begin date'), null=True, blank=True)
     date_end        = models.DateField(_('end date'), null=True, blank=True)
     date_password_init = models.DateField(_("date d'init de mot de passe"), null=True, blank=True)