How can I create model instances in a .py file?

后端 未结 0 1638
北恋
北恋 2020-11-29 02:27

So when I create a model instance using the CLI, it works.

The model:

class Post(models.Model):
    title = models.CharField(max_length=100)
    cover          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题