mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
This commit is contained in:
@@ -90,7 +90,10 @@ class Item(models.Model):
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Object(models.Model):
|
||||
pass
|
||||
related_objects = models.ManyToManyField("self", db_constraint=False, symmetrical=False)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.id)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
|
||||
Reference in New Issue
Block a user