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): ...@@ -102,7 +102,7 @@ class AnObj(models.Model):
uuid = models.CharField(max_length=32, unique=True, blank=True) uuid = models.CharField(max_length=32, unique=True, blank=True)
name = models.CharField(max_length=125) 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) owners = models.ManyToManyField(User, verbose_name=_("owners"), related_name='owned_anobjs', blank=True)
locked = models.BooleanField(verbose_name=_("locked"), default=False) locked = models.BooleanField(verbose_name=_("locked"), default=False)
...@@ -245,8 +245,8 @@ PUBLISHING_MODES = ( ...@@ -245,8 +245,8 @@ PUBLISHING_MODES = (
class AnObjMembership(models.Model): class AnObjMembership(models.Model):
anobj = models.ForeignKey(AnObj) anobj = models.ForeignKey(AnObj, on_delete=models.CASCADE)
user = models.ForeignKey(User) user = models.ForeignKey(User, on_delete=models.CASCADE)
publish_mode = models.IntegerField(choices=PUBLISHING_MODES, default=0) publish_mode = models.IntegerField(choices=PUBLISHING_MODES, default=0)
class Meta: class Meta:
...@@ -255,7 +255,7 @@ class AnObjMembership(models.Model): ...@@ -255,7 +255,7 @@ class AnObjMembership(models.Model):
class EnvParam(models.Model): class EnvParam(models.Model):
anobj = models.OneToOneField(AnObj) anobj = models.OneToOneField(AnObj, on_delete=models.CASCADE)
# ----- Categories Set # ----- Categories Set
category_set_name = models.CharField(max_length=64, blank=True) category_set_name = models.CharField(max_length=64, blank=True)
......
...@@ -11,8 +11,8 @@ class Annotation(models.Model): ...@@ -11,8 +11,8 @@ class Annotation(models.Model):
""" """
# TODO: add description for model Annotation # TODO: add description for model Annotation
owner = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_("owner")) owner = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_("owner"), on_delete=models.CASCADE)
annotable = models.ForeignKey(AnObj, verbose_name=_("annotable"), related_name='annotations') annotable = models.ForeignKey(AnObj, verbose_name=_("annotable"), related_name='annotations', on_delete=models.CASCADE)
item = models.TextField(verbose_name=_("Paper.js item")) item = models.TextField(verbose_name=_("Paper.js item"))
order = models.IntegerField(verbose_name=_("order"), default=0) 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