Model Custom-many third table

Create a third in two ways: django built-in method (ManyToMany)

          Custom two foreign keys

unique_together = [( 'u', 't'),] United unique

Built by a class "class Meta" to define your model metadata, the metadata is "anything that is not a data field.

Guess you like

Origin www.cnblogs.com/jintian/p/11210615.html