python - Using Flask to emulate PHP page -


i'm writing flask+sqlalchemy app replace series of php scripts developed long time ago. 1 of scripts depends on number of keys being available on $_get variable, appname. these values sent external app cannot control.

what best way capture key/value pairs set on $_get flask?

all need examine request object. extract variable called "foo" request, run similar this:

request.args.get('foo', ''); 

this return value of foo parameter, , if doesn't exist return default empty string (the second parameter get function).

here relevant documentation:


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -