p5.js functions not working on ajax success
问题 I'm attempting to integrate a p5.js into a webpage that draws upon receipt of a successful response. I want to draw a tree based on a user entering information that becomes a certain node. I'm using Django as my backend. views.py def index(request): if request.method != 'POST': return render(request, 'index.html') else: if request.is_ajax(): parent = request.POST.get('parent') child = request.POST.get('child') try: # various cases are run through... # case 7: neither child nor parent saved to