1 class Question(models.Model): 2 title = models.CharField(max_length=100) 3 4 class Meta: 5 permissions = ( 6 (‘can_open_question‘,‘创建问答‘), 7 (‘can_reply_question‘,‘能回复回答‘), 8 (‘can_close_question‘,‘能关闭回答‘), 9 )
原文:https://www.cnblogs.com/siplips/p/9651949.html