问题:
admin的所有表名字后面都有一个s,但是verbose_name设置是正常的
解决方法:
在models的表名设置那里多加一行verbose_name_plural = verbose_name
class UsrMngUser(models.Model):
user_name = models.CharField("用户名称",max_length=45, blank=True, null=True)
real_name = models.CharField("真实姓名",max_length=45, blank=True, null=True)
phone_no = models.CharField("电话号码",max_length=20, blank=True, null=True)
password = models.CharField("密码",max_length=45, blank=True, null=True)
class Meta:
verbose_name ="业务员管理员"
verbose_name_plural = verbose_name
managed = False
db_table = 'usr_mng_user'
|