author | fabien@tzone.org |
Sun, 28 Dec 2008 13:45:59 -0500 | |
changeset 62 | 56193b37f666 |
parent 58 | 004a32370ba5 |
child 65 | b975a3d7606a |
permissions | -rwxr-xr-x |
0 | 1 |
#!/usr/bin/python |
2 |
||
3 |
import sys |
|
4 |
import traceback |
|
15 | 5 |
if (__name__ == '__main__'): |
6 |
sys.path.insert(0, "/home/fabien/lib/python") |
|
7 |
sys.path.insert(0, "./lib") |
|
8 |
sys.stderr = sys.stdout |
|
0 | 9 |
|
15 | 10 |
print "Content-type: text/html; charset=iso-8859-1;" |
11 |
||
0 | 12 |
|
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
57
diff
changeset
|
13 |
# import cgitb; cgitb.enable() |
0 | 14 |
import cgi |
15 |
import my_db |
|
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
41
diff
changeset
|
16 |
from os import environ |
57 | 17 |
from actions import actions; |
0 | 18 |
|
19 |
if (__name__ == "__main__"): |
|
20 |
form = cgi.FieldStorage() |
|
57 | 21 |
if form.has_key('debug'): |
22 |
sys.stderr = sys.stdout |
|
23 |
print "<pre>" |
|
21
345ee7421989
[svn r1555] Add multiuser support and more templating.
fabien
parents:
17
diff
changeset
|
24 |
db = my_db.connect(environ["REMOTE_USER"]) |
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
41
diff
changeset
|
25 |
prefs = db.get_preferences() |
57 | 26 |
if form.has_key('action'): |
27 |
action = form['action'].value |
|
28 |
else: |
|
29 |
action = 'default' |
|
30 |
if action in actions.keys(): |
|
31 |
actions[action](action, db, prefs, form) |
|
32 |
else: |
|
33 |
actions['default']('default', db, prefs, form) |
|
34 |
print "</pre>" |