我的模特:
class Venue_Event(models.Model):
user = models.ForeignKey(Profile, db_index=True, on_delete=models.CASCADE)
venue = models.ForeignKey(Venue, on_delete=models.CASCADE)
当我进入管理界面时,我在下划线后面看到一个空格。知道为什么吗?
答案 0 :(得分:2)
如果您愿意,可以更改模型在Meta
中的显示方式,如下所示:
class Venue_Event(models.Model):
user = models.ForeignKey(Profile, db_index=True, on_delete=models.CASCADE)
venue = models.ForeignKey(Venue, on_delete=models.CASCADE)
class Meta:
verbose_name = 'Venue Event'
verbose_name_plural = 'Venue Events'