Beispiel #1
0
#!/usr/bin/env python

import sys
from DatabaseInterface import DatabaseInterface

x = DatabaseInterface()
print x.addLeague(sys.argv[1])
Beispiel #2
0
#!/usr/bin/env python
#!/usr/bin/python

import cgi, cgitb
import sys
import json
sys.path.append('/var/www/elo/database_interface')

from DatabaseInterface import DatabaseInterface
import elo

form = cgi.FieldStorage()

name = form.getvalue('name')
db = DatabaseInterface()
leagueId = db.addLeague(name)
print json.dumps(leagueId)