author | fabien@tzone.org |
Wed, 31 Dec 2008 00:00:09 -0500 | |
changeset 68 | c1f1491f098c |
parent 67 | 652ff41518f3 |
permissions | -rw-r--r-- |
20 | 1 |
These instructions assume that you have the following working |
2 |
together: Web Server, database and Python. I personnaly used |
|
3 |
this configuration for my testing. |
|
4 |
||
5 |
- Apache Web Server (http://www.apache.org/). Currently, the |
|
6 |
only to restrict access to your code, is to used the web server |
|
7 |
authentification. With apache, I used the AuthType Basic and |
|
8 |
Limit/require instruction for doing so. |
|
9 |
||
10 |
- PostgreSQL (http://www.postgresql.org). I try to make my code |
|
11 |
SQL-92 compliant but currently, only test it on PostgreSQL. The |
|
12 |
code can show strange behavior and be corrupt especially if your |
|
13 |
server doesn't support transaction on UPDATE. Also, the DB must |
|
14 |
have a Python DBAPI-2.0 interface. |
|
15 |
||
16 |
- Python (http://www.python.org). I used a python installation 2.1 |
|
17 |
with some basic modules: |
|
18 |
- htmltmpl (http://htmltmpl.sourceforge.net/). A simple HTML |
|
19 |
template system. I always think I should upgrade to a more |
|
20 |
powerful one but htmltmpl really simply do the job. |
|
21 |
- pygresql (http://www.pygresql.org/). A Python DBAPI-2.0 |
|
22 |
interface to postgresql. I think any other DBAPI-2.0 compliant |
|
23 |
module will do it with only small modifications. |
|
28 | 24 |
- xbel-utils. A part of python-xml to manipulate XBEL XML files. |
25 |
Only necessary if you want the XBEL files import feature. |
|
20 | 26 |
|
27 |
-- |
|
28 |
xbelweb installation |
|
29 |
(after untar/unzip the distribution file to a temporary location...) |
|
30 |
||
31 |
1. Move the python code into a repertory where the web server will serve |
|
32 |
the CGI. |
|
33 |
||
68 | 34 |
2. Tell the web server to serve only CGI .py from the root directory of |
35 |
the application. The lib and templates directory content should not be |
|
36 |
used. tests neither and can even be removed. Add any authorization you |
|
37 |
need. |
|
20 | 38 |
|
39 |
3. Create a database for xbelweb (e.g., "xbelweb"), then create the |
|
40 |
tables in the database used by xbelweb using the |
|
41 |
./lib/db/create_db.[your database] definition. I do it with |
|
42 |
psql -U php < create_db.postgresql |
|
43 |
||
67
652ff41518f3
Update index.py and config to use the right information.
fabien@tzone.org
parents:
65
diff
changeset
|
44 |
4. Copy index.py.ex to index.py and edit the necessary information. |
20 | 45 |
|
46 |