Created
April 22, 2019 13:10
-
-
Save specialunderwear/444b5b6022406d744ab5200c45134c8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class ThroughFooBars(models.Model): | |
foo = models.ForeignKey('ThroughFoo', models.DO_NOTHING) | |
bar = models.ForeignKey('ThroughBar', models.DO_NOTHING) | |
order = models.PositiveIntegerField() | |
class Meta: | |
managed = False | |
db_table = 'through_foo_bars' | |
unique_together = (('foo', 'bar'),) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment