阅读背景:

用户将自己添加到Django中的“团队”的最简单方法

来源:互联网 
from django.contrib.auth.models import User
from django.db import models 

class Team(models.Model):
   team_name = models.CharField(max_length=255, unique=True) ## they can create a new team here
   description = models.TextField()
   slug = models.SlugField(unique=True)
   user = models.OneToOneField(User, blank=True, null=True) ## I connect my User here, so they can "own" this info...
from django.contrib.auth.models import User
fro



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: