我的Django模型是这样的: class User(models.Model):
userid = models.CharField(max_length=26,unique=True)
#some more fields that are currently not relevant
class Followers(models.Model):
user =
我有一个使用.Net Core 2.0在Visual Studio 2017中开发的项目的基本模型。型号以下 public class QuoteModel : BaseModel{
public QuoteModel()
{
GetQuoteItems = new List<QuoteItemModel>();
}
[Required]
我是相当新到Python/Django和我有以下问题。 class Foo:
name = models.CharField(max_length=10)
class Bar:
othername = models.CharField(max_length=10)
othername2 = models.CharField(max_length=10)
我对django很陌生。在为我正在编写的应用程序编写模型时,由于我用于单个模型的所有外键(我的票模型是特定的),我觉得自己做错了一些事情。 我在开始时的想法是我希望每张门票都能保存其创建者的信息,该门票分配的队伍以及门票上的注释。和其他不需要外键的信息。我做对了吗?我不知道为什么,但我觉得有更好的方法。 class Team(models.Model):
name = models.Ch