The simplest way is to add __str__
methods ( __unicode__
for Python 2) to your models.
class Role(db.Model):
# snip
def __str__(self):
return self.name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.