moved docs into a 'documentation' directory
This commit is contained in:
parent
d588b554bf
commit
1b706ec81f
4 changed files with 0 additions and 0 deletions
29
README
29
README
|
@ -1,29 +0,0 @@
|
|||
------------------------------------------
|
||||
developers only! this game is currently not playable!
|
||||
|
||||
main.py is the main script. call this from a browser.
|
||||
|
||||
the init_webgo.main() in main.py reinitializes the whole database on each call, so
|
||||
comment the line out if you do not want that. init_webgo also creates two test users,
|
||||
gast and gast2. password = username. you can use those to log in.
|
||||
------------------------------------------
|
||||
some code snippets for reference:
|
||||
|
||||
|
||||
How to make the goban clickable:
|
||||
data += '<form method="post">'
|
||||
data += '<input type=image src="img/bottomrightline.png" name="untenrechts">'
|
||||
#insert rest of goban here
|
||||
data += '</form>'
|
||||
print data
|
||||
|
||||
How to extract the data from this POST with the cgi module:
|
||||
import cgi
|
||||
#get instance of fieldstorage
|
||||
form = cgi.FieldStorage()
|
||||
#if form == empty (which means if page is displayed for the first time):
|
||||
if form.keys() != []:
|
||||
#cut out the name of the clicked button
|
||||
print string.split(form.keys()[0],".x")[0]
|
||||
|
||||
------------------------------------------
|
Loading…
Add table
Add a link
Reference in a new issue