更新数据的两种方式:
方式一:
>> e1 = Event.objects.get(name='hongmi pro')
>> e1.limit=10
>>e1.save()
方式二:
>> Event.objects.select_for_update().filter(name='hongmi pro').update(limit=10)
更新数据的两种方式:
方式一:
>> e1 = Event.objects.get(name='hongmi pro')
>> e1.limit=10
>>e1.save()
方式二:
>> Event.objects.select_for_update().filter(name='hongmi pro').update(limit=10)