On Jan 13, 2006, at 1:12 PM, Ned Batchelder wrote:
I'm used to writing SQL statements like:
delete from app_things where type = 'foo';
to delete a number of objects at once. I don't see a way to do this
type of delete in Django. I was hoping for something like:
things.delete(type__exact='foo')
Certainly I could do this:
for t in things.get_list(type__exact='foo'):
t.delete()
but this incurs a lot more database activity.
Have I overlooked something?
Nope - *we've* overlooked something; this totally should be
possible. I've opened a ticket so we can keep track of this (http://
code.djangoproject.com/ticket/1219).
Jacob