This is probably better spelled as "target = request.params.get('target')" (request.params looks in GET first, then POST).