表单取决于登录用户的用户组,如果登录用户不属于某个组,则应该删除一些story_status值。i有生产者组,如果登录用户不属于生产者组,则我想从story_status中删除选择字段值footage ready。我的代码不排除这些值 models.py class Article(models.Model): ('story not done', 'story
当我尝试运行python3 manage.py makemigrations时,它显示:您正试图在没有默认值的情况下向journey_template添加一个不可为空的字段'topic_id‘;我们不能这样做请选择修复方法: 1)立即提供一次性默认值(将在此列的所有现有行上设置为空值) 2)退出,然后让我在models.py中添加默认值选择一个选项: enter code here from django.db