我有data = request.POST
(即 <QueryDict: {u'device': [u'Camera '], u'todate': [u'2018-05-18'], u'fromdate': [u'2018-04-19']}>
)和
device = data.get('device', None)
,这是数据库表中的列名和用户选择的值(根据用户选择进行更改)
Monitor.objects.values(device)
现在我收到了像 Cannot resolve keyword u'Camera ' into field. Choices are: Camera
how can I convert column name stored in, device variable into a actual column