2014-05-21 71 views
1

這樣,或者你可以這樣做:動態搜索?怎麼樣?

for key, value in data.items(): 
    instance = model_class.objects(key = value) 

或只能做這樣?:

instance = model_class.objects(pk = value) 

回答