我有django模型:
class A_Model(model.Models):
a_Column=models.IntegerField(default=0,db_column='a Column', verbose_name='a Column'),
和观点:
aObject = A_Model.objects.filter(pk=1)
x = getattr(aObject, 'a Column')
我认为它应该可行,但它得到exception [...] "object has no attribute 'a Column'"
有人知道是什么原因并知道如何解决它吗?