A better test program (for use with wsgi)

This is working on my PC. Set this up with apache2 and wsgi.
Visit localhost/qwifi.
The script will generate a random username/password
Add the pair to the radcheck table in the radius database
Generate a QR code that is encoded with username;pasword;;
Display the QR code on your web browser!!
This should all happen everytime localhost/qwifi is visited

P.S. I realize there was no reason for me to query the database for the credentials(line 25-29).
I was just practicing :)