模型choice里面显示的撞了他多少
rule = models.SmallIntegerField(choices=score_rule_choices, verbose_name="积分规则") score_type_choices = ((0, '奖励'), (1, '惩罚'), (2, '初始分配')) score_type = models.SmallIntegerField(choices=score_type_choices, verbose_name="奖惩", default=0) score = models.IntegerField(help_text="扣分数与贝里相等,若为0则代表规则的值可以从别处取得") # maturity_days = models.IntegerField("成熟周期", help_text="自纪录创建时开始计算") memo = models.TextField(blank=True, null=True) def __str__(self): return "%s-%s:%s" % (self.get_rule_display(), self.get_score_type_display(), self.score) class Meta: unique_together = ('rule', 'score_type')
慕设计2395807