mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
This commit is contained in:
parent
4cccb85e29
commit
bbbd698c7a
5 changed files with 65 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue