不同的应用程序间创建ManyToManyField

from django.db import models
from games.models import Game, Genre
from shots.utils import get_unique_slug
from django.utils import timezone

...

model for streamer

class Streamer(models.Model):
nick = models.CharField(max_length=30)
twitch = models.CharField(max_length=70)
games = models.ManyToManyField('games.Game')
...

posted @ 2021-10-15 09:19  未来全栈攻城狮  阅读(21)  评论(0编辑  收藏  举报