init
This commit is contained in:
commit
a5eb556ebb
58 changed files with 911 additions and 0 deletions
39
README
Normal file
39
README
Normal file
|
@ -0,0 +1,39 @@
|
|||
-------------------------------------------
|
||||
WebGo Development:
|
||||
|
||||
Steps to do to get a runnable version:
|
||||
1. create /etc/apache2/conf.d/webgo.conf with content:
|
||||
|
||||
Alias /webgo /home/mtsrc/daten/projekte/webgo/stderr.py
|
||||
|
||||
<DirectoryMatch /home/mtsrc/daten/projekte/webgo/>
|
||||
Options ExecCGI
|
||||
AddHandler cgi-script .py
|
||||
AllowOverride None
|
||||
order allow,deny
|
||||
allow from all
|
||||
</DirectoryMatch>
|
||||
|
||||
You should replace the directory settings for optimal results ;>
|
||||
|
||||
2. set ownership of webgo directory to ownership of the web server
|
||||
|
||||
this should be all. Errors get written to ./cgi_errors.log.
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
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:
|
||||
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