ORM:

INSERT:

>>> agent_status = agents(agent=phone, status=1, queue=queue_number, paused=0)
>>> agent_status.save()

DELETE:

>>> p = Publisher.objects.get(name="O'Reilly")
>>> p.delete()

Update:

>>> b5.name = 'New name'
>>> b5.save()

Комментарии ()