Gitlab CSE Unil

Commit 9672d53f authored by M. Chardon's avatar M. Chardon
Browse files

deprecated db parameters

parent 1bdb1896
......@@ -102,7 +102,7 @@ class AnObj(models.Model):
uuid = models.CharField(max_length=32, unique=True, blank=True)
name = models.CharField(max_length=125)
owner = models.ForeignKey(User, verbose_name=_("owner"), related_name='anobjs')
owner = models.ForeignKey(User, verbose_name=_("owner"), related_name='anobjs', on_delete=models.CASCADE)
owners = models.ManyToManyField(User, verbose_name=_("owners"), related_name='owned_anobjs', blank=True)
locked = models.BooleanField(verbose_name=_("locked"), default=False)
......@@ -245,8 +245,8 @@ PUBLISHING_MODES = (
class AnObjMembership(models.Model):
anobj = models.ForeignKey(AnObj)
user = models.ForeignKey(User)
anobj = models.ForeignKey(AnObj, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE)
publish_mode = models.IntegerField(choices=PUBLISHING_MODES, default=0)
class Meta:
......@@ -255,7 +255,7 @@ class AnObjMembership(models.Model):
class EnvParam(models.Model):
anobj = models.OneToOneField(AnObj)
anobj = models.OneToOneField(AnObj, on_delete=models.CASCADE)
# ----- Categories Set
category_set_name = models.CharField(max_length=64, blank=True)
......
......@@ -11,8 +11,8 @@ class Annotation(models.Model):
"""
# TODO: add description for model Annotation
owner = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_("owner"))
annotable = models.ForeignKey(AnObj, verbose_name=_("annotable"), related_name='annotations')
owner = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_("owner"), on_delete=models.CASCADE)
annotable = models.ForeignKey(AnObj, verbose_name=_("annotable"), related_name='annotations', on_delete=models.CASCADE)
item = models.TextField(verbose_name=_("Paper.js item"))
order = models.IntegerField(verbose_name=_("order"), default=0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment