changes needed for wwwadmin

Move this up before import of psycopg2, then add a blank line between it and psycopg2 import