I am using django and I want to send a signal from one function and and create a 'wait-point' in the middle of another function for that signal.
In more detail, I am using a 3rd party api. So,
def foo():
id = thirdPartyFunction(action='/bar')
id.save()
# send signal!
return render_to_response('pleaseWait.html')
def bar():
# initialize this and that
# ...
# WAIT FOR SIGNAL
return HttpResponseRedirect('success.html')
How do I create a listener in the middle of a function. Currently, my understanding is that the signal dispatcher calls another function. I have no idea how to do this.
Thanks for your time and help :)