0

How can i do both these things at the same time(same instance)?

entity = payment_detail( payment_status='Paid', payment_date=datetime.datetime.now())
a=payment_detail.objects.get(job_post_id=num)
4

1 回答 1

2

你是这个意思吗?

a=payment_detail.objects.get(job_post_id=num)
a.payment_status = 'Paid'
a.payment_date = datetime.datetime.now()
a.save()
于 2013-04-10T12:52:13.003 回答