我有一个这样的模型,我怎样才能遍历它而不必输入 company.id、company.name 等?
class Company(models.Model):
name = models.CharField(max_length=1000)
website = models.CharField(max_length=1000)
email = models.CharField(max_length=200)
phone_number = models.CharField(max_length=100)
city = models.CharField(max_length=1000)
zip = models.IntegerField()
state = models.CharField(max_length=1000)
address = models.CharField(max_length=1000)
address2 = models.CharField(max_length=1000)