def action(request): logger.info("Test") val = request.POST['val'] be = Backend() be.set_pin(26, val) return StreamingHttpResponse("ok")