Bind restrictions to only one item for reduced complexibility

This commit is contained in:
Raphael Michel
2014-10-13 20:17:57 +02:00
parent b2796b1406
commit 2967e64e69
6 changed files with 91 additions and 21 deletions

View File

@@ -677,12 +677,15 @@ class BaseRestriction(models.Model):
related_name="restrictions_%(app_label)s_%(class)s",
verbose_name=_("Event"),
)
items = models.ManyToManyField(
item = models.ForeignKey(
Item,
blank=True,
null=True,
related_name="restrictions_%(app_label)s_%(class)s",
)
variations = models.ManyToManyField(
ItemVariation,
blank=True,
related_name="restrictions_%(app_label)s_%(class)s",
)