forked from DGNum/gestioCOF
fix fields.W342 warning ForeignKey(unique=True) -> OneToOneField
This commit is contained in:
parent
6782f2991a
commit
3e3f0e9f49
3 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ PAYMENT_TYPES = (
|
||||||
)
|
)
|
||||||
|
|
||||||
class Participant (models.Model):
|
class Participant (models.Model):
|
||||||
user = models.ForeignKey(User, unique = True)
|
user = models.OneToOneField(User)
|
||||||
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
||||||
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
||||||
paid = models.BooleanField (u"A payé", default = False)
|
paid = models.BooleanField (u"A payé", default = False)
|
||||||
|
|
|
@ -48,7 +48,7 @@ PAYMENT_TYPES = (
|
||||||
)
|
)
|
||||||
|
|
||||||
class Participant (models.Model):
|
class Participant (models.Model):
|
||||||
user = models.ForeignKey(User, unique = True, related_name = "participants2")
|
user = models.OneToOneField(User, related_name = "participants2")
|
||||||
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
||||||
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
||||||
paid = models.BooleanField (u"A payé", default = False)
|
paid = models.BooleanField (u"A payé", default = False)
|
||||||
|
|
|
@ -48,7 +48,7 @@ PAYMENT_TYPES = (
|
||||||
)
|
)
|
||||||
|
|
||||||
class Participant (models.Model):
|
class Participant (models.Model):
|
||||||
user = models.ForeignKey(User, unique = True, related_name = "participants3")
|
user = models.OneToOneField(User, related_name = "participants3")
|
||||||
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
|
||||||
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
|
||||||
paid = models.BooleanField (u"A payé", default = False)
|
paid = models.BooleanField (u"A payé", default = False)
|
||||||
|
|
Loading…
Reference in a new issue