Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
def _action(action, o):
o.is_processing = False
def _bulk_action(action, objs):
for o in objs:
def bulk_action(request, t):
objs = model.objects.filter(pk__in=pks)
if request.method == 'POST':
from multiprocessing import Process
p = Process(target=_bulk_action,args=(action,objs))
return HttpResponseRedirect(next_url)
context = {'t': t, 'action': action, 'objs': objs, 'model': model}
return render_to_response(...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment