How to retrieve model column value dynamically in python

后端 未结 2 1611
清酒与你
清酒与你 2020-12-22 05:53

Suppose I have a model object.

print (dir(table))
[\'...\', \'col1\', \'col2\', \'...\']

# this will output column 1 value
print (table.col1)
2条回答
提交回复
热议问题